My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com

Pages










Showing posts with label unicode. Show all posts
Showing posts with label unicode. Show all posts

Monday, July 8, 2019

Localization and Globalization testing

Globalization is the process of designing and developing applications that function for multiple cultures.
Localization is the process of customizing your application for a given culture and locale.
Globalization focuses your applications capibilities on users as a generic user-base, whereas localization focuses on subsets of users in a given culture or locale. So you can think of globalization as a strategic venue, where as localization is tactical.

Localization makes our software acceptable for a particular culture or locale that makes users to accept the adaptable software. For example Adobe Pdf is used in many languages. It is available in Japanese, Chines or even English :)
Localization testing checks how well the build is translated into a particular target language in given geaographic locale.


Globalization makes our software function in any culture/locale. The goal is to detect potential problems in application design that could hamper globalization. We work to make sure that the code can handle all international support.
For instance, we should support text data in the ANSI (American National Standards Institute) format. Unicode support should be tested. We should handle strings in each language. Right to left and Left to right scripts shall also be tested with.

Tuesday, May 9, 2017

Unicode characters in Eclipse console : Resolving Eclipse IDE issue when console runner not shows Unicode and Multibyte characters.

First of all little gyaan:

What is Unicode character string:
Earlier we used ASCII etc to encode characters. But the limit of the number of characters were less. Obviously, you cannot capture world in 256 numbers!
Then we developed some more encoding to cater to all languages but many of them had issues like below:
1. A particular code value corresponds to different letters in the various language standards.
2. The encodings for languages with large character sets have variable length. Some common characters are encoded as single bytes, other require two or more byte.

Here enters our beloved Unicode. Our hero, a new language standard was developed and in this character holds 2 byte. Hence, java or C++ or any language, uses 2 byte for characters representation.

lowest value:\u0000
highest value:\uFFFF


My problem statement in this post is that sometimes the unicode characters are not visible in the output console of Eclipse IDE. This blog post aims to solve that.



Suppose our program is:
public class Simple{
public static void main(String... args){
System.out.println("Hi World!");

String arabicText = "اسمي أنور";
String banglaText = "আমার নাম আনোয়ার";
String urduText = "میرا نام انور ہے";
String hindiText = "मेरा नाम अनवर है";
String frenchText = "Je m'appelle Anwar";

System.out.println(arabicText);
System.out.println(banglaText);
System.out.println(urduText);
System.out.println(hindiText);
System.out.println(frenchText);
}
}

On running the output is:
Hi World!
???? ????
???? ??? ???????
???? ??? ???? ??
???? ??? ???? ??
Je m'appelle Anwar

See screenshot:






To resolve this you need to Modify your Run Configuration:
To Open Your Run Configuration. This can be achiebved by:
In Package Explorer, right click on your project
Run As-> Run Configurations


Here In the common Tab, check the Encoding used:

Change it to UTF8.
Click apply and Run





Now Run the program and you should find correct result. New output is:

Hi World!
اسمي أنور
আমার নাম আনোয়ার
میرا نام انور ہے
मेरा नाम अनवर है
Je m'appelle Anwar

See screenshot:

You can download the repository having the sample code from Gitup. See: https://github.com/Anwar-Faiz/Simple-Java-Unicode