Char Tag
This tag inserts automatically with HTML and WordPress
.
${
char
}
- usage : ${char}
This tag will convert non UTF-8 characters in your text content to any given language in the HTML output.
text
, and is designed for web-outputs with Lightning Storm
only.Character Encoding
When using ${char}
tag, all non-utf8
text characters are encoded for optimal rendering and decoded on the webpage using JavaScript. All character decoding is run-time based and will occur after the webpage loads.
Working with Clients and Production Releases
There are situations where you may have a client or boss that requires the actual language characters rather than the UTF8 encoding. If you have a localhost or website, you can easily convert your files to your current language settings.
PHP Decoder (File)
1 2 3 4 5 | <?php $ek_file = 'yourfile.html'; file_put_contents($ek_file,rawurldecode(file_get_contents($ek_file))); echo 'Decoded!'; ?> |
PHP Decoder (Directory +All Files)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <?php $ek_path = realpath('/path/to/decode/'); $ek_files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($ek_path), RecursiveIteratorIterator::SELF_FIRST); //parse all files in the folder foreach($ek_files as $name=>$object){ if($object->isDir()) continue; $ek_file = $object->getPathname(); file_put_contents($ek_file,rawurldecode(file_get_contents($ek_file))); } echo 'Decoded!'; ?> |
- Create a test directory on your localhost or website
- Copy your html files to the directory
- Create an index.php page and add the code above
- Navigate to the directory via HTTP (web browser)
This will re-encode your html files with the correct language characters allowing for a fully optimized text output.
Working with Android Text
Android treats Text very differently regardless of your character settings. Because the text is in the sting files, we recommend you use the ASCII
value of your text.
You can google "ascii to Unicode converter", or "ascii to utf8 converter" and you should find a few resources that can convert blocks of text. You can then use the converted text sting in your PSD design and you should be good-to-go!