• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Pl help me convert this in unicode

 
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I failed to understand the basics of unicode representation in java or for that matter perhaps missing the baiscs of java too!!
Now what i know is a unicode value needs to be shown in following manner:
[B]\u0624[\B]
I have a string value, which has values without "\u" e.g.
[B]String temp = "06420624";[\B]
here actually it should be:
[B]
0642 = \u0642
0624 = \u0624
[\B]
But as I have temp as string value so I lost the path of converting it. Is there any way of converting this String into unicode value.
regards,
arun
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you saying that every group of four hexadecimal digits (say nnnn) in the string has to be converted to the character '\unnnn' at runtime?
-Barry
[ September 02, 2002: Message edited by: Barry Gaunt ]
 
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps this code will illustrate some of the Java concepts involved.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or, as I have just tried:

Same sort of thing as John's, but I'm not going throw it away just 'cos he got there first!
[ September 02, 2002: Message edited by: Barry Gaunt ]
 
How do they get the deer to cross at the signs? Or to read this tiny ad?
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic