Hi all,

You can skip part 1 if you want, but read part 2, please.
<Part 1>
the following claim have been detected while trying to (hardly) implement a 
multi-platform styled text multi-media software (using 
FolderItem.OpenStyledEditField EditField on all platforms).

The rtf text (used under Windows) have been created using TextEdit to load 
FolderItem.OpenStyledEditField EditField generated files under Mac OS X and 
export them as rtf files. Those rtf files are the ones loaded by the Windows 
version of the project (both in the IDE and as Stand-Alone applications 
generated by Windows' REALbasic standard 2006 Release 4).

In other words, I have three sets of styled text: one under Mac OS X (I use 
.ctxt for color txt / do not made a mistake with other .txt files), the second 
as Mac OS X generated rtf files and a third (the Mac OS X generated rtf files 
saved with WordPad after a small change). Think at the time spent to achieve 
that and the quantity of error I can made in the process (and I made a lot).
</Part 1>

Macintosh environment:
----------------------
a. PowerBook G4 Alu 15", 512MB, 80MB (August 2004),
b. Mac OS X 10.4 upgraded 'till 10.4.8,
c. last iTunes to date (early november) with QuickTime installed,
d. REALbasic 2006 Release 4 Pro Edition,
e. TextEdit to generate the rtf files from my styled text files.

Windows environment:
--------------------
a. Fujitsu-Siemens Pentium IV 2.8GHz,
b. Windows XP SP II,
c. last iTunes to date (early november) with QuickTime installed,
d. REALbasic 2006 Release 4 Standard Edition,
e. My project running in the IDE / Stand-Alone application generated by d,
f. WordPad


Since "ages" (first versions of REALbasic for Windows!), I have trouble with 
rtf files generated on Mac OS X and used under Windows using my programs.

The text rendering is awful, looks like what it was prior TrueType fonts 
(Vectorial) when you use a 16 points while you only have a 14 points bitmap 
font installed...

After spending five (yes 5) hours of testings, turning around the problem in 
the rtf files (with a Memory Stick and one Windows machine with XP SP II / one 
PowerBook machine with 10.4.8), I finally get an idea of what happens.

First of all, let me tell you what I have done and what result I get, then I 
will share what I feel about it.
In WordPad, select the whole text and type Occidental (French version, do not 
know 'bout US version) in the third popup menu (first is Font Name, second is 
Font Size) gives a correct result from my "wrong" rtf files. Boring process! [1]


1. The final quest result:
--------------------------

in the \fonttbl part, under Mac OS X, I get \fcharset77 while on Windows, I 
have \fcharset0. I simply make a global search/replace (search \fcharset77 and 
replace it with \fcharset0).

Copy the modified file on the Memory Stick, move the Memory Stick to the 
Windows machine, load the file and get the text perfectly nice!

BUT, I found that non ASCII characters are not the one I have under Mac OS X!

A search in the rtf definition file (from Microsoft www) gaves me the answer: 
the number after the \fcharset rtf tag is the Character Set (here we better 
write Character Encoding!).


2. My feeling about the trouble
-------------------------------

Either WordPad and/or REALbasic rtf text rendering have not implemented the 
value 77 (Mac) encoding part.
Worst, it can be Windows XP SP II (but in that case I feel that we heard 'bout 
it long time ago).


REAL Software Engineers, can you make a simple test * and report _YOUR_ result ?
[this can take only less than the time to smoke a cigarette to run the test, 
please.]


Thanks for all,

Emile


PS: for me, there is a bug here. The real question is: "Who owns the bug?", 
then "Who will squash the bug?" and "When ?" [2]


* what test to do ?
Simple: run TextEdit on Mac OS X, save some text as rtf text (simple text with 
some styles and colors), copy the file under Windows, click on it to see it on 
WordPad (who cares about WordPad ?) but not Word (I do not own it).
Then, run a REALbasic application who deals with Styled Text (who use something 
like: rtfFileFI.OpenStyledEditField EFrtfRendering) using 
FolderItem.OpenStyledEditField EditField and - if you get what I say earlier - 
check the REALbasic to know why / report that the claim is true (something 
wrong have been discovered).

A best will be to say: "We will add the correct Encoding as soon as possible" 
in the report (if my claim is correct).


<quote from rtf definition file>
Control word    Meaning
\fcharsetN  Specifies the character set of a font in the font table. Values for 
N are defined by Windows header files:

 0      ANSI
 1      Default
 2      Symbol
 3      Invalid
 77     Mac
128     Shift Jis
129     Hangul
130     Johab
134     GB2312
136     Big5
161     Greek
162     Turkish
163     Vietnamese
177     Hebrew
178     Arabic
179     Arabic Traditional
180     Arabic user
181     Hebrew user
186     Baltic
204     Russian
222     Thai
238     Eastern European
254     PC 437
255     OEM
</quote from rtf definition file>



[1] From the Mac OS X Dictionary:

boring |ˈbôri ng |
adjective
not interesting; tedious : <i>I've got a boring job in an office.</i>

[2] Usually people would answer: "Microsoft", "Only the Shadow knows" and "do 
not hold your breath 'till the bug squash release version".
Please, make the people goes wrong on that one :)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to