The Artima Developer Community
Sponsored Link

Design Forum
Unicode Rendering in WinXP SP3, Word 2003

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jacob Quisenberry

Posts: 1
Nickname: jquisenber
Registered: Jan, 2010

Unicode Rendering in WinXP SP3, Word 2003 Posted: Jan 14, 2010 10:23 PM
Reply to this message Reply
Advertisement
I am trying to find a configuration that will allow Word to render Chinese characters contained in a UTF-16 text file.

The text file may contain any combination of characters in


CJK Unified Ideographs (4E00–9FFF)
CJK Unified Ideographs Extension A (3400–4DBF)
CJK Unified Ideographs Extension B (20000–2A6DF)
Latin (English) characters from BMP
The plain text file will not have any information indicating what block the text is in. I have been running tests on a text file containing these few characters:


Traditional Chinese
義 禮
Simplified Chinese
义 礼
CJK Extension A
㡛 㬐
CJK Extension B
ઘƠঞՍ

The corresponding hex code is
00000000h: FE FF 7F A9 00 20 79 AE 00 20 00 0D 00 0A 4E 49 ; þÿ©. y®. ....NI
00000010h: 00 20 79 3C 00 0D 00 0A 38 5B 00 20 3B 10 00 0D ; . y<....8[. ;...
00000020h: 00 0A D8 69 DE 06 00 20 D8 59 DF 95 00 0D 00 20 ; ..ØiÞ.. ØYß•...
00000030h: 00 0A ; ..

I tried editing font linking in the registry at
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]

Word correctly detects and displays the first 6 characters. However, Word sets the font of the last two characters as SimSun, a character that does not contain the necessary characters. I should point out that those two characters are surrogates in UTF-16. However, Word has not displayed them correctly even when I try UTF-8.

My edit to the registry was to add these fonts to each base font (including Courier New):
Sun-ExtB.ttf,Sun-ExtB
SimSun18030.ttc,SimSun-18030
Sun-ExtA.ttf,Sun-ExtA
HAN NOM B.ttf,HAN NOM B

All four fonts are installed on my system. I also made sure to edit
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\LanguagePack]
"SURROGATE"=dword:00000002

Surrogate fallback planes 1 and 2 are configured to HAN NOM B, which is a CJK Extension B-containing font.

Topic: javafx Previous Topic   Next Topic Topic: Technology Selection for a web application

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use