OSDN Git Service
(root)
/
winmerge-jp
/
winmerge-jp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7eb3344
)
Convert Unicode chars outside BMP to surrogate pairs
author
sdottaka
<none@none>
Wed, 20 Jul 2011 16:51:43 +0000
(
01:51
+0900)
committer
sdottaka
<none@none>
Wed, 20 Jul 2011 16:51:43 +0000
(
01:51
+0900)
Src/Common/unicoder.cpp
patch
|
blob
|
history
diff --git
a/Src/Common/unicoder.cpp
b/Src/Common/unicoder.cpp
index
ce09bff
..
19cb7af
100644
(file)
--- a/
Src/Common/unicoder.cpp
+++ b/
Src/Common/unicoder.cpp
@@
-590,6
+590,12
@@
void maketchar(String & ch, unsigned int unich, bool & lossy, unsigned int codep
ch = (TCHAR)unich;
return;
}
+ else if (unich < 0x110000)
+ {
+ ch = ((unich - 0x10000)/0x400 + 0xd800);
+ ch += ((unich % 0x400) + 0xdc00);
+ return;
+ }
lossy = TRUE;
ch = '?';
return;