Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: encoding
Hi,
 
I need to add some Russian language strings in Notepad++. So I added and encoded those strings to UTF-8. If I see added strings in my application, those are showing as changed strings. If I encoded as ANSI, Russian strings are displaying as junk character.
 
Please help me.
 
Thanks in advance.
Posted 29-Apr-12 3:39am
Comments
SAKryukov at 29-Apr-12 8:47am
   
Not clear how did you "added" strings in UTF-8. What is your application and why it uses Notepad++? Did you try to open the file encoded as UTF-8 in Notepad++? Did it work? If it works (I believe it should), your code should also work.
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Have a look at the Scintilla Documentation[^].
 
Scintilla is the editor component of Notepad++, and it looks like utf-8 is the default for GTK+ builds only.
 
Best regards
Espen Harlinn
  Permalink  
Comments
SAKryukov at 29-Apr-12 21:56pm
   
Good point, my 5.
I still think that for Windows UTF-16LE should do the trick.
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Try UTF-16LE. This is the default encoding used in Windows, when Unicode text is presented in memory.
 
Please see my comment to the question — you did not provide enough information to be 100% sure on what are you trying to do.
 
—SA
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I would do as SA stated, using UTF-16LE (which in .NET can be obtained simply by System.Text.Encoding.Unicode.
 
Note that you should set the first 2 bits of the file to FF FE, which is the little-endian byte order mark. It will tell Notepad++ which type of text file it has to deal with.
  Permalink  
Comments
divirakshana at 30-Apr-12 3:42am
   
Thanks for the reply.
 
What is the difference between ANSI and UCS-2 Little Endian? If i use UCS-2 Little Endian instead of ANSI, any problems will come? Because UCS-2 Little Endian is working fine for me.
 
Please suggest me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Zoltán Zörgő 220
1 Peter Leow 160
2 CPallini 120
3 BillWoodruff 85
4 bling 80
0 Sergey Alexandrovich Kryukov 9,428
1 OriginalGriff 6,901
2 Peter Leow 4,737
3 Zoltán Zörgő 4,349
4 CHill60 2,932


Advertise | Privacy | Mobile
Web04 | 2.8.150129.1 | Last Updated 29 Apr 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100