File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
An Unicode (UTF8 : right arrow ->) validation
Joined: Aug 21, 2008
Apr 21, 2009 13:34:51
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.
Joined: Oct 13, 2005
Apr 21, 2009 14:45:16
I think you need to provide more
Joined: Aug 23, 2005
Apr 21, 2009 15:07:15
You can convert the UTF-8 bytes to Unicode as shown below by the pseudo code. The compare it as a
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.
rocket mass heater
subject: An Unicode (UTF8 : right arrow ->) validation
UTF vs Unicode (JQ+)
java String UTF8
unicode value for char
How to store foreign characters from request parameters to beans
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014