Hey Codeplug,
The 2 files are attached.
The characters are either imported from a .srt file, or typed in. In the case they were typed in.
My beta tester has zero knowledge on programming, they just run an .exe I send them.
Thanks again,
Steve :)
Printable View
Hey Codeplug,
The 2 files are attached.
The characters are either imported from a .srt file, or typed in. In the case they were typed in.
My beta tester has zero knowledge on programming, they just run an .exe I send them.
Thanks again,
Steve :)
Your "Spain" file seems to not have BOM :confused:
Is is opened by Notepad as ASCII!
And IE doesn't want to open it at all:And, BTW, in Notepad both files look similar:Quote:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
An invalid character was found in text content. Error processing resource 'file:///C:/Documents and Settings/Victor/Local S...
and "Spain"Code:<?xml version="1.0" encoding="UTF-8"?>
<!-- *** XML Subtitle File *** -->
<!-- *** Created by DCPPro Timed Text Editor *** -->
<!-- *** written by Steve Quartly *** -->
<DCSubtitle Version="1.0">
<SubtitleID>86761cb6-a54f-47ca-a72b-c49fde2a6fbd</SubtitleID>
<MovieTitle>SQ Test</MovieTitle>
<ReelNumber>1</ReelNumber>
<Language>en</Language>
<Font Color="ffffffff" Effect="shadow" EffectColor="ff000000" Size="42">
<Subtitle SpotNumber="1" TimeIn="00:00:00:000" TimeOut="00:00:05:000" FadeUpTime="020" FadeDownTime="020">
<Text HAlign="center" HPosition="0" VAlign="bottom" VPosition="23">Prueba de subtitulado: Camión</Text>
<Text HAlign="center" HPosition="0" VAlign="bottom" VPosition="17">it´s good?. áéÃ*óú</Text>
<Text HAlign="center" HPosition="0" VAlign="bottom" VPosition="11">äëïöü ¿? ¡!</Text>
</Subtitle>
</Font>
</DCSubtitle>
Code:<?xml version="1.0" encoding="UTF-8"?>
<!-- *** XML Subtitle File *** -->
<!-- *** Created by DCPPro Timed Text Editor *** -->
<!-- *** written by Steve Quartly *** -->
<DCSubtitle Version="1.0">
<SubtitleID>fc2210a1-257a-4b9c-938f-6ddcb42e9a8a</SubtitleID>
<MovieTitle>SQ Test</MovieTitle>
<ReelNumber>1</ReelNumber>
<Language>en</Language>
<Font Color="ffffffff" Effect="shadow" EffectColor="ff000000" Size="42">
<Subtitle SpotNumber="1" TimeIn="00:00:00:000" TimeOut="00:00:05:000" FadeUpTime="020" FadeDownTime="020">
<Text HAlign="center" HPosition="0" VAlign="bottom" VPosition="23">Prueba de subtitulado: Camión</Text>
<Text HAlign="center" HPosition="0" VAlign="bottom" VPosition="17">it´s good?. áéÃ*óú</Text>
<Text HAlign="center" HPosition="0" VAlign="bottom" VPosition="11">äëïöü ¿? ¡!</Text>
</Subtitle>
</Font>
</DCSubtitle>
The Australia file is UTF8 encoded.
The Spain file is Codepage encoded.
They both represent the same characters, just with different encodings.
Neither files have a BOM, but in this case, the encoding="UTF-8" provides the encoding. But I don't think that notepad is that smart :)
>> In this case they were typed in.
Where? In your application or in some other editor?
It doesn't make any sense that your CUnicodeFile actually produced the text in the Spain xml, assuming that you really do have both _UNICODE and UNICODE defined for your project.
- If you do have _UNICODE and UNICODE defined, then CUnicodeFile::WriteString() will clearly perform a WideCharToMultiByte(CP_UTF8, ...) operation and write the results to the file.
- The contents of the Spain xml are clearly not UTF8, and therefore did not come from the WideCharToMultiByte(CP_UTF8, ...) operation.
This starting to look like a communication issue. I would ask your Spain tester what he's really doing to produce that file.
gg
Thanks for your help everyone.
I'll do some checking with my beta tester.
If I get to the bottom of it, I'll post the result.
Steve :)