Misha Konvisar
2013-08-15 20:40:21 UTC
Hello everyone,
I'm having a minor issue.
Writing a plugin for Notepad++. This plugin is adding annotations to lines
in document.
The problem is that I'm not able to display a Cyrillic text in annotation
when I have my document in UTF encoding.
When I switch document to ANSI, then I'm able to see a Cyrillic annotation
text, but not able to see a Cyrillic text in document.
I see just strange unreadable characters in annotations box.
That is how I'm adding annotation box:
public static void AddCommentToLine(int position, string text)
{
Encoding unicode = Encoding.Unicode;
Encoding encoder = Encoding.UTF8;//.GetEncoding(1253); here I've tried
different outuput encodings, but no result...
string strEncoded = encoder.GetString(Encoding.Convert(unicode,
encoder, unicode.GetBytes(text)));
Win32.SendMessage(curScintilla, SciMsg.SCI_ANNOTATIONSETTEXT, position,
strEncoded);
}
I had similar problem, when was trying to read line from document, but this
was solved with encoding scintilla output to UTF8, after that my C# code
was able to work with scintilla text correctly.
Has anybody face this problem?
I think my problem is transferring Unicode string to scintilla editor.
Should I use some styles for annotations?
Thank in advance!
I'm having a minor issue.
Writing a plugin for Notepad++. This plugin is adding annotations to lines
in document.
The problem is that I'm not able to display a Cyrillic text in annotation
when I have my document in UTF encoding.
When I switch document to ANSI, then I'm able to see a Cyrillic annotation
text, but not able to see a Cyrillic text in document.
I see just strange unreadable characters in annotations box.
That is how I'm adding annotation box:
public static void AddCommentToLine(int position, string text)
{
Encoding unicode = Encoding.Unicode;
Encoding encoder = Encoding.UTF8;//.GetEncoding(1253); here I've tried
different outuput encodings, but no result...
string strEncoded = encoder.GetString(Encoding.Convert(unicode,
encoder, unicode.GetBytes(text)));
Win32.SendMessage(curScintilla, SciMsg.SCI_ANNOTATIONSETTEXT, position,
strEncoded);
}
I had similar problem, when was trying to read line from document, but this
was solved with encoding scintilla output to UTF8, after that my C# code
was able to work with scintilla text correctly.
Has anybody face this problem?
I think my problem is transferring Unicode string to scintilla editor.
Should I use some styles for annotations?
Thank in advance!
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.