How to display arabic characters in windows 7




















The easiest solution would be using strings normally and changing the default encoding in your workspace for example eclipse. My original Answer is wrong: getBytes produces a bytearray using the system's default encoding, which netbeans sets to UTF Only use Strings.

Should work fine. EDIT: See comments for the actual problem and explanation why solution is not completely possible. It assumes that the characters inside the ByteArrayOutputStream are utf-8, which is not correct since java uses utf The output of the method on the other hand is a valid java String which is again: utf So you use an array that contains utf characters interpret it as utf-8 and convert it to utf If your source code is encoded in UTF-8, you must set the -encoding parameter when compiling.

Otherwise the compiler will use the system's default encoding, which is probably cp in your case Windows 7, Spanish , and doesn't support Arabic.

You should remove all the conversions to bytes, they can only make the matters worse. This is how it should work:. The native2ascii command line tool can do this conversion for you. For example, the code generated for the above two lines would be:. I faced this issue in Windows Server , my Arabic characters where passed as "??? Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Trying to show arabic characters in Java Ask Question.

Well, I figured out that I can actually use cygwin. Running the script from cygwin with "Courier New" font does the job. I'm glad you made it. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.

Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. After restarting you should be able to See Arabic. Your Windows 7 will remain in its main language ie: English as in this tutorial interface, icons and themes will not be effected with this configuration. If you are looking to change the language of the interface and icons you can install the Arabic pack Microsoft. Source for this tutorial : iamiraqi. Find it cheap on Amazon.

The setting process is straight forward, and settings will be used by and affect ONLY programs that need it. Got to Start menu. Choose Settings, and click on control Panel. Double click on Regional and Language Options. You will see 4 tabs: choose Administrative the rightmost tab. Click: Change System Locale. You will see 3 tabs only. Chose Advanced the rightmost tab.



0コメント

  • 1000 / 1000