Skip to main content
September 16, 2008
Question

stripping non utf-8 characters from string

  • September 16, 2008
  • 2 replies
  • 1554 views
hello all,

I would like to strip (or replace) all non utf-8 characters from a string (for example a form-textfield). What is the most simple way to achieve that?

thanks in advance,
rudy struyf
This topic has been closed for replies.

2 replies

Inspiring
September 17, 2008
a square means either there's a slight encoding issue or more likely the font you chose to display these doesn't contain that glyph.

if your table is using one of "N" datatypes to hold your unicode text and you're using the JDBC driver instead (labeled as ms sql server) of the ODBC one then it's most likely a simple font issue.

got a public page i can see that shows this issue?
Inspiring
September 16, 2008
alpenman69 wrote:
> I would like to strip (or replace) all non utf-8 characters from a string (for example a form-textfield). What is the most simple way to achieve that?

no such thing as non-utf8 chars. what exactly are you trying to do?
September 16, 2008
I would try to clean the string before sending it to a database (sql server)