Forum for discussing general topics related to Couch.
7 posts Page 1 of 1
Dear all,

first, I like the Couch CMS very much. As I code a small sites, I generally prefer static HTML to a CMS becouse of better control of the code behind the screen, debugging, etc. Now, I just started tinkering with the Couch and it seems to offer exactly the features I sometimes need, i.e. let my customer edit the content easily without risk of breaking something, I would certainly be happy to use it on a wider scale.

Now, here comes my issue: A small static website, CouchCMS deployed, editable regions set. However, if I open the content for editing, instead of

Code: Select all
<li>Tlumočení obchodních jednání a schůzek všech úrovní, interně i s cizími subjekty, včetně telekonferencí</li>


I see

Code: Select all
<li>Tlumočen&iacute; obchodn&iacute;ch jedn&aacute;n&iacute; a schůzek v&scaron;ech &uacute;rovn&iacute;, interně i s ciz&iacute;mi subjekty, včetně telekonferenc&iacute;</li>
.

If I paste a piece of a clean HTML code into the Couch editor (without the acutes), the characters go wild on the front end (I mean the website in a browser).

Obviously, there is something about the charset.

I have carefully checked and it all reads UTF-8 in both the config.php and the web page header, the document has been saved in UTF-8 (although I am not sure about the BOM if it plays any role), no succcess.

I use linux Mint and Geany as a html editor (tried Pluma too, tho).

Could you please give me a hint where I shall look?
Hi :)

I tried pasting the string you quoted into both 'text' and 'richtext' regions on my test system and things worked just fine for me after saving (both in the admin-panel as well as the front-end). Screenshot from my system -
Untitled-2.jpg
Untitled-2.jpg (36.93 KiB) Viewed 3180 times

Since, as you said, you have already checked that the charset is set to UTF-8, I can't think of any other reason for this to happen.

If your installation happens to be online, please feel free to PM me the FTP+Couch access creds and I can try to troubleshoot the issue first-hand (that is, if it is fine with you).

Thanks.
Hi!

I tested your text and it comes out, that acutes appear only in richtext ckeditor.
Textarea editable has no such problem.

I think you better leave it, as these acutes are displayed only in view-source mode of ckeditor. In usual view and in html this is all just fine. So it's not your system or Couch. It's ckeditor and its code that recodes stuff.

If this is crucial, then switch to textarea can help.

PS KK, you are one step ahead :) Check View-Source in ck. It will show acutes.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
@trendoman,
Check View-Source in ck. It will show acutes.

Yes, it will - that is the expected behavior with richtext. However, the characters are displayed normally in its edit view and also on the front-end so how it internally stores characters shouldn't be a bother.

I don't think that when @MiB said "if I open the content for editing", he meant going into the source-view as that would be rather unusual :) Perhaps @MiB can clarify?
Thanks a lot for your responses, guys! Just got back to it after some days and after a couple of test reinstalls on LAMP I can confirm this:

The browser view is okay, the browser code view is okay too (I mean, no acutes). In the CMS itself the rich text view is now okay, the only place where I see the code is the source view in the editor.

...although I once had the Czech characters broken in the editor rich text view and they even transferred to the php file itself. I am getting lost in the testing and cannot unfortunately really reproduce it for reference

I could live with that as the user will preferably edit the rich text and if he breaks something, I can always paste in clean html myself. What puzzles me, however, is that although you say the above is the default CKE behaviour and I also have seen some such comments in my searches, I have another php script (QuickCart) up and running, which has a CKEditor with Czech characters displaying correctly (no acutes) in the HTML code view too. Shall I look for some CKE plugin then? "Specialchars" for instance?

Regds.,

MiB

Edit: Okay, here is the trick: add
Code: Select all
config.entities=false;
to the config.js in the CKEditor plugin directory.
MiB wrote: I have another php script (QuickCart) up and running, which has a CKEditor with Czech characters displaying correctly (no acutes) in the HTML code view too.

Maybe it was tinymce?

Edit: thanks for sharing the solution!
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
In that shopping cart I have actually both TinyMCE and CKE but only CKE is employed. Now I can explore the Couch further. ;o)

Anyway, for anyone dealing with special country characters in CKEditor in the future or interested in some tweaking, here is the reference: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.protectedSource.
7 posts Page 1 of 1