| Summary: | DBCS: Cannot display some Korean glyphs on Linux | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | leading <wswb0922> | ||||||||
| Component: | SWT | Assignee: | Felipe Heidrich <eclipse.felipe> | ||||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||||
| Severity: | major | ||||||||||
| Priority: | P2 | CC: | Tod_Creasey, ycpeng | ||||||||
| Version: | 3.0 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Linux-GTK | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 9252 [details]
the picture of err code.
the picture of err code.
Was there anything in the .log file? This is a websphere workbench project - we do not supply these so I am not sure what the issue is. I can't read Chinese - are you saying that the text is not displaying correctly? If so this may be a result of Bug 56195 1.I use the command " ./eclipse -consolelog " to start the eclipse . and do this testcase again, but i not find *.log file . 2.sorry- the step 5&6 of recreate the problem is: 5-Click on EDU SOL: My New Wizards in the left pane of the dialog ,then select the "My Basic Wizard" option,then click next. 6-Select the check box, "Select to set pageComplete" true . 3. In this testcase, we import dialog.zip plug-in, and use it's wizard to create a file. But garbage charctors showed in the file's editor. (But in Win32/CHS, the result is OK) Created attachment 9274 [details]
Testdata--dialogs.zip
Testdata--dialogs.zip
What is the editor you are using for this file and what is the font? This is difficult for us to trace as you are not using editors or projects that ship with Eclipse. Does this happen with an import or editing combination in Eclipse? I suspect you are seeing Bug 56915. 1- I am using the defult text editor and select editor's Text file encoding "Defult(EUC-KR) " for this file , the font is the system defult "Sana- regular-10"; 2- From now on, I have found this problem only on this testcase . Could you try the following please 1) Go to the fonts and colours preference page 2) Select Uncategorized - Text Font 3) Select Use System Font 4) Hit OK Does your text render correctly now? yes,you are right. i do it as your say step by step. *** This bug has been marked as a duplicate of 56915 *** This bug also exist on build wswb-I20040413-200404151406. Why did you reopen this PR? Do you not think it is the same problem as Bug 56915? *** This bug has been marked as a duplicate of 56915 *** This may be a problem dup with #56915 which is supposed to be "resolved fixed" in I20040408 build and later. BUT, we still saw this problem on eclipse I20040413 build. Therefore we reopened this bug against eclipse I20040413 build in case it is not actually dup w/ #56915. Please verify #56915 since Felipe said it has been Fixed in HEAD > 20040408. If you reopen #56915 afterwards and confirm these two bugs are same problems, please duplicate them again. Thanks We can't verify this Bug as I am not sure exactly what you are doing differently. The bug we fixed is that you could not enter a DBCS character into an editor and have it render correctly. From what I see here I am not sure what is different in your test case - the screenshot you are showing is an editor not rendering properly. It is not clear to me how you are generating its content. Ines please verify that we can render DBCS characters on Linux. Hi Tod, We verified this defect on build IES-3.0-20040427 on RHEL WS 3.0(KOR) that it still occurred. Please change the "My new file Contents" and "RButton1 Text" in the test.properties file to encoding "\ucf64\ud6da\ubb4f". this defect will be re- created.Thanks We do more testing for this problem and found, for Korean font, if the 2nd byte is "DA" (ex: D6DA, D5DA, BADA), then it can not be display correct on editor, if you change the character to others which the 2nd byte is not "DA", then it could be displayed well on editor. And this problem only happened on RH_KOR not Win32_KOR. Do you also get this problem when typing those characters directly into a text editor? Moving to SWT as this is a rendering issue. FH, bug still seen in 0427 build. This can not be a duplicate of Bug#56915 cause this problem is in GTK! What is the name of the font where it fails ? "Sana-regular-10" ? I don't have this font on system, wouldn't it be: "Sans-regular-10" Try to run this code in your machine, does it fail ?
import org.eclipse.swt.*;
import org.eclipse.swt.custom.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class PR57559 {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new GridLayout());
StyledText text = new StyledText(shell, SWT.MULTI | SWT.WRAP);
text.setLayoutData(new GridData(GridData.FILL_BOTH));
text.setText("\ucf64\ud6da\ubb4f \ud6da\ud5da\ubada");
shell.setSize(500, 300);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
Hi, This test code is running successful. All those characters are displayed correct. which font is bad ? The font that fails. You guys can edit the code in comment21 adding the lines: Font font = new Font ("name-of-bad-font", 12, SWT.NORMAL); text.setFont(font); Replace "name-of-bad-font" by the real name of the bad font, and replace 12 by the correct height as well, the same goes for the style, it can be SWT.NORMAL, SWT.BOLD, SWT.ITALIC. Provide me with the failure situation. Created attachment 10252 [details]
refer the image file for the result.
Hi,
We use "Sans-regular-10", and we don't think that it's "bad font".
We run your code, the characters are displayed correct on first line, then we
directly copy/paste the result to 2nd line on the same panel,
==> the char display as unicode. (refer PR57559.jpg).
We think, this problem has less connection with "font", then encoding convert.
We have try below code in eclipse on our RedHat. (LANG = ko_KR).
public class PR57559Bug {
public static void main(String[] args) {
// simulate the code in
com.ibm.wsweducation.solution.dialogs.MyNewFileWizardPage.java
StringBuffer sb = new StringBuffer();
sb.append("\ucf64\ud6da\ubb4f \ud6da\ud5da\ubada");
byte[] bstr = sb.toString().getBytes();
System.out.println("Source Unicode string length:
"+sb.length()+", after convert to Korean char: "+bstr.length);
// In our machine, the output is "Source Unicode string length:
7, after convert to Korean char: 9"
// before program write the byte[] to file, some Korea char
already become '?' (hex code is '0x3f')
}
}
I've tested it (a lot). It looks like these unicode codepoints (\ud6da \ud6da \ud5da \ubada etc) have no equivalent in EUC-KR. When you copy the string to the clipboard the string is convert from Unicode to the default system encoding (EUC-KR in this case), the information is missed during the conversion. The funny thing is: those are Korean characters, and on an English machine it works cause the default is UTF-8, but it fails on Korean machines (default encoding is to EUC-KR). There is nothing I can do about it. The only solution I can think of is to set UTF-8 as the default encoding in Korean: export LANG=ko_KR.UTF-8 Closing pr. Sorry but I can't be more helpful EUC-KR only supports subset of hangul characters that were expanded by Unicode 2.0. We have to use UTF-8 locale to use full set of Hangul. Since this is EUC- KR common restriction, not only in IES.So We decided to close it. |
Reporter: Tony Liu OS: RHEL WS 3.0 -gtk Language: KOR Build level: wswb-30M8-200403291703 JDK Version: IBM JDK 1.4.2 Beta Test case #: UI10:Wizards with DBCS Summary: DBCS:Error code show in the Runtime workbench when great wizards with DBCS. Description: Steps to recreate problem: 1-Imported the "com.ibm.wsweducation.solution.dialogs" projects. 2-Change the each of the key values in the "test.properties" file to DBCS data's Unicode. 3-Run the plug-in under the Runtime workbench. 4-Create a new simple project in the Runtime workbench . 5-Click on EDU SOL: My New Wizards in the left pane of the dialog ,then select the “My Basic Wizard” option,then click next. 6-Select the check box, “Select to set pageComplete true” . 7-Go to the packages view and open the file to inspect the contents. (ui10.jpg) <<Error>> Error code show in the Runtime workbench when great wizards with DBCS. <<Expected Result>> No Error code show in the Runtime workbench when great wizards with DBCS.