Re: Character Set Problem?

Tech-Archive recommends: Fix windows errors by optimizing your registry



I glad it worked out for you, Bruce, and thanks for letting us know.

--
Brendan Reynolds
Access MVP

"BruceS" <BruceS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:89E285C9-6CEF-438B-85E6-E135154F0998@xxxxxxxxxxxxxxxx
Brendan,

Thanks for replying! I tried to respond earlier, but had a bad cookie on
my
machine and I couldn't log into this site. Took MS 2 days to tell me they
couldn't really help.

Anyway...

We changed the first line of the XML file to:

<?xml version="1.0" encoding="ISO-8859-1"?>

and the special characters imported correctly.

Problem solved!

Thanks again,
Bruce


"Brendan Reynolds" wrote:


The problem could still be in the process that creates the files.

I ran into something similar myself when I created XML files from VBA.
There
was no problem until I created a test file with accented characters, e.g.
'á'. The problem was that VBA was creating the file using ISO-8859-1. XML
parsers assume (if I remember correctly) UTF-8 if no encoding is
specified,
so the actual encoding and the declaration did not match. This didn't
cause
a problem with 'standard' characters because (if I understand correctly)
those characters had the same codes in both encodings. But as soon as I
started introducing 'non-standard' characters the discrepancy between the
actual encoding and the declaration became a problem. So, even if other
files from the same source don't exhibit the problem, this could be
because
they don't contain any characters in the problem range.

If this is what is happening, the solution is to find out what encoding
is
actually being used when the file is created, and change the declaration
to
match. If the vendor of the program that creates the files can't tell you
what the actual encoding is, I'm not sure what you can do. Possibly it
might
be worth asking the question in an XML forum.

--
Brendan Reynolds
Access MVP

"BruceS" <BruceS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F147581C-822C-4639-BF5C-2AE1798EA735@xxxxxxxxxxxxxxxx
(This is a re-post of one from yesterday that wasn't answered. Still
needing
help.)

I have an Access 2002 database that imports an XML file. It has been
working fine.

We just added a new client in south FL to the routine, and the import
fails
when it first encounters a name containing the "nya" character (tilde n
or
ñ).

CodeWrite shows the value of the character as a Hex F1, and displays it
as
a
"plus-minus" symbol.

I'm guessing that it is a character set problem, but how can I fix?

New info:

1. Have tried changing the first line of the XML file from:
<?xml version="1.0"?>
to:
<?xml version="1.0" encoding="UTF-8"?>
It did not help.

2. Word will import the file and handle the "ñ" properly, but neither
Access
nor Excel will do so.

3. Running XP Pro. Regional settings and language are English (US).

4. Another vendor's program creates the XML files, and I have verified
that
they use the same logic to create all of the files. All other XML
files
created by this routine process fine.

Really need to get this going. Any help greatly appreciated.
Bruce





.



Relevant Pages

  • Re: Character Set Problem?
    ... was no problem until I created a test file with accented characters, ... so the actual encoding and the declaration did not match. ... I have an Access 2002 database that imports an XML file. ...
    (microsoft.public.access.modulesdaovba)
  • Re: UnicodeEncodeError while reading xml file (newbie question)
    ... "System does not support the specified encoding. ... Those characters I posted in the original message should ... what encoding is mentioned up the front of the XML file ...
    (comp.lang.python)
  • Re: XML with chinese character problem
    ... > In order to store non-ANSI characters in xml file, ... > or other encoding matches your language. ... >> chinese character, Then, the xml will got something unknow characters. ... >> Private Sub InterchangeHeaderIdentification() ...
    (microsoft.public.dotnet.xml)
  • Re: Problems with special characters in XML
    ... as long as the encoding declaration in the xml directive matches the actual ... I would like to read out an XML file using the XMLDocument object ... My XML file contains special characters using the ...
    (microsoft.public.dotnet.xml)
  • Re: Strange Characters When Viewing Outlook Express messages
    ... Messages Received in Outlook Express Have Different Characters in the ... messages in the default encoding format regardless of the actual encoding ... changed something with whatever they use to produce the emails. ...
    (microsoft.public.windowsxp.general)