View Single Post
  #24  
Unread 12-06-2006, 06:47 PM
Zonx's Avatar
Zonx Zonx is offline
A Green Troll
This person is a EQ2Map developer.
Featured
 
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
Default

Ok tested it and EditPlus is changing the encoding. An example of this can be seen by opening the file you provided in UIBuilder and examining the Tooltip field for the MOTD. The tooltip includes an apostrophy which once the encoding is changed to standard UTF-8, does not get properly converted. More alarming is that this results in a progressive degeneration problem that converts "&" to & every time the file is saved from UIBuilder. After a few saves, you end up with something like

's

Instead of just 's

The original line of code (line breaks added for easier reading)
Code:
<Text Font="/Fonts.FontZapf18" LocalText="[DEVL] Level X" 
LocalTooltip="Guild&apos;s current level" Location="287,76" 
Margin="0,0,5,0" Name="SocietyLevelText" PackLocation="right,top" PackLocationProp="-481/0001,0076/0001" ScrollExtent="109,36" 
Size="109,20" TextAlignment="Right" TextAlignmentVertical="Center" 
TextColor="#EBDEAA" Tooltip="Guild&apos;s current level">[DEVL] Level X</Text>
The same line of code after saving from EditPlus, then saving from UIBuilder
Code:
<Text Font="/Fonts.FontZapf18" LocalText="[DEVL] Level X" 
LocalTooltip="Guild&amp;apos;s current level" Location="287,76" 
Margin="0,0,5,0" Name="SocietyLevelText" PackLocation="right,top" 
PackLocationProp="-481/0001,0076/0001" ScrollExtent="109,36" 
Size="109,20" TextAlignment="Right" TextAlignmentVertical="Center" 
TextColor="#EBDEAA" Tooltip="Guild&amp;apos;s current level">[DEVL] Level X</Text>
Compare the LocalTooltip values.

The problem here isn't with the UTF-8 callout, its with the special double-bite caracter not even visible in many text editors. In Notepad it appears as a square. In other editors it's often translated into a line break. It falls after the encoding tag and before the first XML tag
Code:
<?xml version="1.0" encoding="utf-8"?>[]<Page
Most editors convert that illedgable character when the file is opened. When you save, its gone and UIBuilder will from that point on, fail to understand entities already in the file, converting the & on every save. Progressively corupting your files.
Reply With Quote