mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-05 17:44:55 -06:00
*CtrlCore: Fixed charset encoding issues in EncodeRTF, RichEdit: ClipZoom method
git-svn-id: svn://ultimatepp.org/upp/trunk@3323 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
7386be99a3
commit
82fdf80b01
6 changed files with 24 additions and 5 deletions
|
|
@ -222,16 +222,14 @@ void RTFEncoder::Command(const char *cmd, int param)
|
|||
|
||||
void RTFEncoder::PutText(const wchar *text)
|
||||
{
|
||||
for(; *text; text++) {
|
||||
if((uint16)*text >= 128) {
|
||||
stream.Put(NFormat("\\u%d\\'%02x", (int16)*text, FromUnicode(*text, CHARSET_DEFAULT)));
|
||||
}
|
||||
for(; *text; text++)
|
||||
if((uint16)*text >= 128)
|
||||
stream.Put(NFormat("\\u%d?", (int16)*text));
|
||||
else {
|
||||
if(*text == '{' || *text == '}' || *text == '\\')
|
||||
stream.Put('\\');
|
||||
stream.Put((byte)*text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RTFEncoder::PutBinHex(const byte *b, int count)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue