Monday, July 22, 2013

Re: Themed Views & Unicode

Thank you. 

Yes, I did think of that. I did a cat of the files and could see unicode properly. I got

/opt/lampp/htdocs/cake/app/View/Themed/Default/Layouts$ file --mime default.ctp
default.ctp: text/html; charset=utf-8

I have moved to Ubuntu recently. The cakephp 1.x files were written in the Windows environment. So, this was my first suspicion. 

It seems to me that while the cakephp is building the webpage, the unicode characters are not being read/written properly. I did not find any other setting, other than the one in core.php

I will also have to stand corrected, that it is not just the unicode chars in the themed files, but the chars in the view/controller files. Since controller file cannot have utf-8 encoding I am using hash encoding for such chars. 

ex: $this->Session->setflash('ನೀವು ದಾಖಲಿಸಿದ ಹೊಸ ಪುಸ್ತಕವನ್ನು ಕಾಯ್ದಿರಿಸಲಾಗಿದೆ. ಪುಸ್ತಕಗಳ ಪಟ್ಟಿಗಾಗಿ ಇಲ್ಲಿ ಕ್ಲಿಕ್ ಮಾಡಿ.');

Even these end up being "?"
Regards,
Harish


Regards,
Harish




On 23 July 2013 06:47, lowpass <zijn.digital@gmail.com> wrote:
What is the output of the following?

file --mime your-theme-file


On Mon, Jul 22, 2013 at 1:42 PM, Harish <harishamur@gmail.com> wrote:
I have developed an application using themes. The app has unicode characters. It works fine in Cakephp 1.x. I have been trying to migrate it to cakephp 2.x and I am facing certain issues. I did a lot of search on google as well as discussions, however could not find any solution.

The problem is that the unicode characters are being displayed as "?". These are unicode characters from the layout files, the controller code, the view code. However the unicode characters fetched from the database are being displayed properly.

I have set the encoding in core to UTF-8 and the encoding in the database config file as utf8.

I am using UBUNTU 12.04, XAMPP (lampp) 1.7.7, cakephp 2.x

Thank you,
Harish

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.

To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.

To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: