Deesen / YAMS

Original Fork of YAMS (Yet Another Multilingual Solution for Evolution CMS)
http://modxcms.com/forums/index.php/board,381.0.html
8 stars 7 forks source link

Wrong config encoding #1

Closed labasus closed 8 years ago

labasus commented 13 years ago

Last version 1.2.0 RC3 has an issue in yams.config.inc.php file encoding.

I have - ANSI (generated automatically) Must be - UTF8-without BOM

If wrong encoding, then languages names and backend can't be saved normally.

hauptbenutzer commented 13 years ago

Works fine here. yams.config.mgr.inc.php is encoded as UTF-8 so the string that's constructed and then written to yams.config.inc.php should be UTF-8 as well.

ghost commented 13 years ago

I have found the same issue. The config file is written and read as iso-8859-1. Even if I create or correct the file myself, the module opens it as iso-8859-1, and any saves will write the file as iso-8859-1. This occurs on both a local OS X system and remote Linux shared-hosting systems.

The difference won't be noticed unless you're using non-iso-8859-1 characters.

cloughy commented 11 years ago

Hello :) Is there anyone who found a way ? Maybe this topic could help (http://forums.modx.com/thread/?thread=63115.0%3Bwap&i=1&page=1)...Sottwell was talking about this function

cloughy commented 11 years ago

//---------------------------- // itsEncodingModifierMode //---------------------------- $contents .= ' // The encoding modifier.' . PHP_EOL . ' // \'manager\' means use the manager setting' . PHP_EOL . ' // \'u\' if webpage content is in UTF-8' . PHP_EOL . ' // \'\' otherwise' . PHP_EOL . ' $this->itsEncodingModifierMode = ' . YamsUtils::AsPHPSingleQuotedString( $this->itsEncodingModifierMode ) . ';' . PHP_EOL;

Deesen commented 8 years ago

I found the issue.. yams.util.class.inc.php function StripControlCodes() crashes multilingual characters. Because self::UTF8Modifier() is NULL ...