Project: SWT
Bug 308329 [TUR3.6]: ArrayIndexoutOfBoundsException occurred when paste TR characters in Console when Run C++ project
Reported: 2010-04-07 10:04:33 | Status: closed fixed

Build Identifier: I20100403-1602 ===== Description ===== It is happened in SUSE11/TR. Run C++ project. Paste EN characters in Console, the console return hello EN characters. Paste TR characters in Console, the "ArrayIndexoutOfBoundsException" message is displayed. We had tried this on RHEL environment and this was working OK. Just seems to be SLES problem only. ==== Environment ===== Build Level: I20100403-1602 Component: CDT Platform: SUSE11 JRE: IBM Java 5 SR11 Affected Locale(s): Turkish ===== Expected Result ===== The TR character is displayed in console correctly. ===== Actual Result ===== "ArrayIndexoutOfBoundsException" message is displayed. Reproducible: Always Steps to Reproduce: ===== Steps To Reproduce ===== 1. Create a new C++ project 2. Enter a project name in NL characters in the input field. Select Executable project > Empty project as project type. If youre testing in Windows, choose the MinGW toolchain in the wizard. For RHEL, use the Linux GCC toolchain. For Mac OS X, use the MacOSX GCC toolchain. Click Next, Click Finish. 3. Create a new C++ source file: Name the source file main.cpp 4. Click Finish. The editor will be opened. Type the following into main.cpp. #include <iostream> #include <string> using namespace std; //This is a comment. Hello World! int main() { string yourName; cout << "Enter your name: "; cin >> yourName; cout << "Hello " + yourName << endl; return 0; } 5. Create a new C++ class using the New Class Wizard: 6. Make sure the checkbox beside the Namespace input field is checked. Create Class1 in Namespace1. 7. Click Finish. 8. Right click on it and select Build Project to build your project. Go to the toolbar and select Run -> Run Configurations... 9. Click on C/C++ Local Application. 10. Youll be prompted to specify a C/C++ Application to run. 11. Click on the Run button. 12. The Console View is now in focus and your programs output is displayed. Enter a name in TR characters and press Enter.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java