Replacing unicode characters in text field

G

Guest

I have a data table that was imported from a text file (output from another
application). One of the text fields contains a bunch of unicode characters
that have taken the place of ASCII characters like the underscore, left and
right quotes (different characters), the apostrophe, and several others.

I'd like to write an update query to change these characters back to their
the appropriate ASCII characters, but cannot find an Access function that
will identify these unicode characters, chrW( ) does not seem to work in
either the instr( ) function or in a Like clause.

Any ideas.
 
G

Guest

Can you create a User Defined Function in VBA to do this?
Access queries can call a UDF from a VBA standard module
in the same database.

(david)
 
G

Guest

Maybe.

I've tried any number of things, but Access is not handling the unicode
well. If I go into a field, and copy it, then go to the immediate window and
paste the text, it replaces the unicode characters with 2 consecutive
characters in the 250 range of the Ascii table. If I loop through the
recordset and debug.print, it replaces the unicode characters with the plus
(+) symbol.

I've tried looping through the characters in the string and using
AscW(mid$(rs("Comment"), intCharPos,1)), and I'm getting values like (9554,
9556, 9560, 9576). When I look these codes up in PowerPoint, they are
related to the Arial Unicode MS - CJK Unified Ideographs.

I'll see if I can make some sense of which characters are which, and
identify others and see if I can use replace( ) to replace them with the
correct characters.

--
Email address is not valid.
Please reply to newsgroup only.


david@epsomdotcomdotau said:
Can you create a User Defined Function in VBA to do this?
Access queries can call a UDF from a VBA standard module
in the same database.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top