avoid corrupt of xml files

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
bess
Language Partners
Language Partners
Posts: 282
Joined: Thu Dec 18, 2008 9:37 am
Location: Bretagne

avoid corrupt of xml files

Post by bess »

hello everybody

my question may not be obvious to any English but i've still hoping to found my answer with you

when you make a xml file with your module, you must doing some things to avoid corrupt of your xml file
  • avoid all emphasis in all files (.tpl, .php, .js, language files, ...)
  • avoid all windows files like thumb.db
I've already done all this things but... it's still corrupt

any ideas ?  ???

all emphasis already treated :
àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ
bess
Language Partners
Language Partners
Posts: 282
Joined: Thu Dec 18, 2008 9:37 am
Location: Bretagne

Re: avoid corrupt of xml files

Post by bess »

with notepadd++ i made this search in regex

[^A-Za-z0-9=?&%\*#\-_+/;:,!'" /\.\[\]{}()@\t$\\|\^]

to find all but this list
  • A->Z
  • a->Z
  • 0->9
  • =
  • ?
  • &
  • %
  • -
  • _
  • +
  • /
  • ;
  • :
  • ,
  • !
  • '
  • "
  • space
  • [ and ]
  • { and }
  • ( and )
  • @
  • tab (\t)
  • $
  • \
  • | (pipe)
  • ^ (xor)
no result. So what can i do ?
bess
Language Partners
Language Partners
Posts: 282
Joined: Thu Dec 18, 2008 9:37 am
Location: Bretagne

Re: avoid corrupt of xml files

Post by bess »

any ideas ?
cyberman

Re: avoid corrupt of xml files

Post by cyberman »

How have you create the xml files?
bess
Language Partners
Language Partners
Posts: 282
Joined: Thu Dec 18, 2008 9:37 am
Location: Bretagne

Re: avoid corrupt of xml files

Post by bess »

admin > modules > clic on xml button
bess
Language Partners
Language Partners
Posts: 282
Joined: Thu Dec 18, 2008 9:37 am
Location: Bretagne

Re: avoid corrupt of xml files

Post by bess »

good news :

xml file created from my pc (windows + Wampserver) = corrupt
xml file created from my server (unix + apache) = ok

i don't understand why... maybe the config of my wampserver ?
NaN

Re: avoid corrupt of xml files

Post by NaN »

It is the encoding of the linebreaks i guess.
Windows, Mac OS X and Unix use different ones.
There should be an option in Notepad++ to setup what line endings should be used.

Make also sure that your file is stored with utf8 or unicode encoding.
Windows uses ASCII or ANSI by default i guess.
This also may mess up the content of the file.

In the most cases i opened the XML file with an editor that supports unicode or UTF-8 encoding and appropriate settings and just stored it again.

See also: http://forum.cmsmadesimple.org/index.ph ... 143.0.html
bess
Language Partners
Language Partners
Posts: 282
Joined: Thu Dec 18, 2008 9:37 am
Location: Bretagne

Re: avoid corrupt of xml files

Post by bess »

yes Nan, you must have right...

bad news for me but at last i've solution :)
Post Reply

Return to “Developers Discussion”