Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unicode problem  RSS feed

 
helmy saleh
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please,
how can I set the text of a button or a label in a unicode characters?
for example how can I set the text(caption) of the button in arabic language, for more information Iam usin TextPad 4 (Iam not sure the version is 4 or not but Iam using TextPad).

if you can send the answer to me by my email I will be very thank you
helmy_amedy@yahoo.com

with respects
 
manish basotia
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can create a string with unicode characters the string must be created using hexadecimal values.
for example.
String s = "\'\uFEF4\'"+"\'\uFEB5\'"+"\'\uFEBC\'"+"\'\uFB9A\'";
then create the button with this string
JButton b = new JButton(s);
hope this solves your problem.
Thanks & Regards
Manish B
 
Aaron Roberts
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have any experience working with character encodings on web pages? I'll email you as well with this question, as I don't want it to get off topic.

Regards,
Aaron R>
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!