encoding issues
encoding issues
Have serious troubles with content encoded as windows-1257.
I suggest using second argument (encoding) of htmlentities as variable which can be set in config, or giving choice to use htmlspecialchars instead (via 'middleware' function or so).
cheers,
Marius
I suggest using second argument (encoding) of htmlentities as variable which can be set in config, or giving choice to use htmlspecialchars instead (via 'middleware' function or so).
cheers,
Marius
- Oliver Georgi
- Site Admin
- Posts: 9888
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
If think so. But then all source files have to be updated adding this new variable to all references to htmlentities.
Frontend + backend files (index.php, phpwcms.php and others that have their own html head) should use this variable encoding as well.
However, multilingual site option should also be considered... so perhaps an array of encodings can be defined to be also accessed as template-tag and/or in user preferences.
Can you estimate when this feature can be implemented? Do you need any help?
cheers,
Marius
Frontend + backend files (index.php, phpwcms.php and others that have their own html head) should use this variable encoding as well.
However, multilingual site option should also be considered... so perhaps an array of encodings can be defined to be also accessed as template-tag and/or in user preferences.
Can you estimate when this feature can be implemented? Do you need any help?
cheers,
Marius
- Oliver Georgi
- Site Admin
- Posts: 9888
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
I'd suggest including $encoding variable to each instance of htmlentities and perhaps quote_style variable as well, set in config. Both having default values if not set. That should be more optimal than using intermediate function.
And the $encoding variable should be used throughout all php files with html heads as well as being available to reference or override (for multilingual sites) from templates.
Content forms should also use global or local encoding for individual sections. Though I have no idea how to implement it... You know the architecture better.
cheers,
Marius[/i]
And the $encoding variable should be used throughout all php files with html heads as well as being available to reference or override (for multilingual sites) from templates.
Content forms should also use global or local encoding for individual sections. Though I have no idea how to implement it... You know the architecture better.
cheers,
Marius[/i]
- Oliver Georgi
- Site Admin
- Posts: 9888
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Thank you for the care!
By the way I was considering creating my own simple CMS and surprisingly came across yours. You've made amazingly simple and yet powerfull CMS.
I have ideas about more useful features, so should I just present them or would it be possible event to contribute some code (which I haven't written yet )?
Marius
By the way I was considering creating my own simple CMS and surprisingly came across yours. You've made amazingly simple and yet powerfull CMS.
I have ideas about more useful features, so should I just present them or would it be possible event to contribute some code (which I haven't written yet )?
Marius
- Oliver Georgi
- Site Admin
- Posts: 9888
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
- Oliver Georgi
- Site Admin
- Posts: 9888
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
What happens if you insert your chatset encoding in "index.php" line 56:
change to
Oliver
Code: Select all
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Code: Select all
<meta http-equiv="Content-Type" content="text/html; charset=win-1257">
So in my case of unsupported windows-1257 encoding a replacement function is a best solution. In the case of supported encoding it will be normal htmlentities function with second argument while in the case of unsupported one it may be simple htmlspecialchars function.
Regarding multilingual sites. can be removed from frontend's index.php and set in any template even via drop-down list fed from array of encodings.
But would it be possible to have different charset encodings in backend forms?
Marius
Regarding multilingual sites.
Code: Select all
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
But would it be possible to have different charset encodings in backend forms?
Marius
- Oliver Georgi
- Site Admin
- Posts: 9888
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
- Oliver Georgi
- Site Admin
- Posts: 9888
- Joined: Fri 3. Oct 2003, 22:22
- Contact: