• Post Reply Bookmark Topic Watch Topic
  • New Topic

Convert to UCS2  RSS feed

 
Amgad Muhammad
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,
i need to convert arabic characters to UCS2, can anyone help

for example: يستبشر المسلم خيرا حين يرى أول ثمار الزرع فيحمد الله على نعمه، وقد كان صلى الله عليه وسلم إذا رأى أول الثمر، قال: اللهم، بارك لنا في ثمرنا

should be:

%D9%8A%D8%B3%D8%AA%D8%A8%D8%B4%D8%B1%20%D8%A7%D9%84%D9%85%D8%B3%D9%84%D9%85%20%D8%AE%D9%8A%D8%B1%D8%A7%20%D8%AD%D9%8A%D9%86%20%D9%8A%D8%B1%D9%89%20%D8%A3%D9%88%D9%84%20%D8%AB%D9%85%D8%A7%D8%B1%20%D8%A7%D9%84%D8%B2%D8%B1%D8%B9%20%D9%81%D9%8A%D8%AD%D9%85%D8%AF%20%D8%A7%D9%84%D9%84%D9%87%20%D8%B9%D9%84%D9%89%20%D9%86%D8%B9%D9%85%D9%87%D8%8C%20%D9%88%D9%82%D8%AF%20%D9%83%D8%A7%D9%86%20%D8%B5%D9%84%D9%89%20%D8%A7%D9%84%D9%84%D9%87%20%D8%B9%D9%84%D9%8A%D9%87%20%D9%88%D8%B3%D9%84%D9%85%20%D8%A5%D8%B0%D 8%A7%20%D8%B1%D8%A3%D9%89%20%D8%A3%D9%88%D9%84%20%D8%A7%D9%84%D8%AB%D9%85%D8%B1%D8%8C%20%D9%82%D8%A7%D9%84%3A%20%D8%A7%D9%84%D9%84%D9%87%D9%85%D8%8C%20%D8%A8%D8%A7%D8%B1%D9%83%20%D9%84%D9%86%D8%A7%20%D9%81%D9%8A%20%D8%AB%D9%85%D8%B1%D9%86%D8%A7
 
Campbell Ritchie
Marshal
Posts: 56595
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"AG" please read the important administrative private message which I have just sent you.
 
Campbell Ritchie
Marshal
Posts: 56595
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry, the only person allowed to beat me by one minute is Rob P!
 
Carey Evans
Ranch Hand
Posts: 225
Debian Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not UCS-2, it's application/x-www-form-urlencoded UTF-8. Have a look at http://java.sun.com/javase/6/docs/api/java/net/URLEncoder.html , and let us know if you have any trouble using it.
[ December 18, 2008: Message edited by: Carey Evans ]
 
Amgad Muhammad
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Carey Evans:
That's not UCS-2, it's application/x-www-form-urlencoded UTF-8. Have a look at http://java.sun.com/javase/6/docs/api/java/net/URLEncoder.html , and let us know if you have any trouble using it.

[ December 18, 2008: Message edited by: Carey Evans ]


Thank you Carey, it worked fine
 
ramzi ghaith
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Amgad,

I'm looking for Java code to convert from Arabic text (UTF-8) to UCS-2 encoding, i think you experienced to do that.

Any help will be appreciated.

Regards,
Ramzi
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!