Hi all,
I have a problem with displaying URL to image where the files and folders are in cyrillic letters.
Files and folders are created in cyrillic letters (through CKFinder) as it should, but when I select the image the URL to the image is like:
/userfiles/images/%D1%9B%D0%B8%D1%80%D0%B8%D0%BB%D0%B8%D1%86%D0%B0/%D1%9B%D0%B8%D1%80%D0%B8%D0%BB%D0%B8%D1%86%D0%B0.jpg
but it should be:
/userfiles/images/ћирилица/ћирилица.jpg
Please note when I create the link to some URL to address where the name of the page is in cyrillic letters, everything is showing as it should be.
Does anybody knows how to fix this.
Thanks.
For anyone interested in his
For anyone interested in his issue, I will just sum up the discussion around this issue that we had.
All links returned by CKFinder (including the one passed to CKEditor) are URL-encoded (using encodeURIComponent).
CKFinder internally operates on UTF8 file names. When CKFinder sends the data back to the application, it has no idea whether the parent application is using internally UTF8 as well. The other application might be using "iso-8859-2" for example. If the URL was not properly percent-encoded, all the non-ASCII chars that come from UTF8 would result in invalid links.
The set of characters to encode is taken from RFC3986. All percent-encoded URL-s will work without any problems.
CKFinder must work in every possible environment, which means for example users uploading files with Chinese/Japanese/Hebrew/Arabic file names, which are later displayed to the user on a page with random encoding.
As CKFinder is unable to detect if all the environment works in UTF8, the only option that might make sense is to introduce a new configuration option, which would turn off calling encodeURIComponent when the URL is returned, and CKFinder would encode just a selected set of special characters mentioned in RFC3986.
This feature request was added to our internal tracker. However, please note that it will take some time for it to be implemented.
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!