Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Comments
Sergey Alexandrovich Kryukov 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

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
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 29-Apr-12 21:56pm    
Good point, my 5.
I still think that for Windows UTF-16LE should do the trick.
--SA
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
 
Share this answer
 
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.
 
Share this answer
 
Comments
divirakshana 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900