Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
An Unicode (UTF8 : right arrow ->) validation
joshua asem
Greenhorn
Posts: 13
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
An Unicode (UTF8 : right arrow ->) coming from database need to validate at my
Java
program and replacing it with "blank". Could some give some idea on this. Thanks in advance.
Joshua
Cheers,
Joshua
Campbell Ritchie
Marshal
Posts: 79178
377
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I think you need to provide more
details
, please.
Manhar Puri
Ranch Hand
Posts: 41
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You can convert the UTF-8 bytes to Unicode as shown below by the pseudo code. The compare it as a
string
in Java and replace with empty string.
byte[] utf8 = <whatever data is>
// Convert from UTF-8 to Unicode
string = new String(utf8, "UTF-8");
Hope this helps.
I am going down to the lab. Do NOT let anyone in. Not even this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
UTF vs Unicode (JQ+)
How to store foreign characters from request parameters to beans
unicode value for char
java String UTF8
string UTF8
More...