RE: finding non ascii characters in the database
Posted in 2009
Floyd, First, may I offer you my condolences on migrating to Oracle. Yeah I support Oracle, but its like comparing an Abrams Tank to a T-72. And if you saw the Iraq wars, you can see how well the T-72 did. :-P But to answer your question... You can't do what you want to do. If you dump the database I don't think you can get OD to work for you. (Although it may...) What I was thinking was writing an ESQL/C program. Starting at your system tables, for each table in a given database, find the columns that are character fields. (char, varchar, etc..). Write and prepare select statements that select all the columns from a table, and then parse those fields looking for non-ascii characters. Dump the row to a flat file log if you find any data. I believe you can use the ctype.h (isalnum()) function or write your own. Shouldn't be too hard. (Dare I say trivial?) But the larger question is why should you have issues with character sets above the ascii values? Internally I believe Oracle supports UTF-8. So how are you exporting and importing the data? -G Date: Thu, 20 Aug 2009 05:59:58 -0500 Subject: finding non ascii characters in the database From: floyd@fwellers.com To: informix-list@iiug.org We're having some issues with ascii characters when migrating tables over to Oracle. What would be the best way to determine which tables and columns contain non-ascii data ? All I can think of now is to either unload the whole database and do a unix od command or some other grep for non-ascii characters, or some query to select all rows of all tables with a where clause that selects non ascii characters. any ideas would be appreciated. Thanks, floyd _________________________________________________________________ Hotmail® is up to 70% faster. Now good news travels really fast. http://windowslive.com/online/hotmail?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_faster:082009