Text encoding in the contact form (feedback form)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Text encoding in the contact form (feedback form)

Chen, Yian
Hi all,

I got an enquiry in Japanese via the contact form and the context
couldn't show properly (become question marks).
I have tried to look into ContactForm and ContactAction classes but I
didn't get any hint.
I have also tried to print out the form content from the HttpRequest,
the data was there and was urlencoded.
However, when trying to getParameter from the HttpRequest, the content
became question marks.

Any idea to solve this problem?

Thanks in advance.

Chen


_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Text encoding in the contact form (feedback form)

Justin Clark-Casey
Just to check, I presume that the font on your machine that this text uses does have the necessary glyphs for displaying Japanese?  Questions marks are commonly
subsituted when the font doesn't have the necessary characters.

--
Justin Clark-Casey, Synbiomine/InterMine Software Developer
http://synbiomine.org
http://twitter.com/justincc

On 20/10/15 08:34, Chen, Yian wrote:

> Hi all,
>
> I got an enquiry in Japanese via the contact form and the context couldn't show properly (become question marks).
> I have tried to look into ContactForm and ContactAction classes but I didn't get any hint.
> I have also tried to print out the form content from the HttpRequest, the data was there and was urlencoded.
> However, when trying to getParameter from the HttpRequest, the content became question marks.
>
> Any idea to solve this problem?
>
> Thanks in advance.
>
> Chen
>
>
> _______________________________________________
> dev mailing list
> [hidden email]
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Text encoding in the contact form (feedback form)

Chen, Yian
Hi Justin,

Thanks for your reply.
I am using Japanese OS (Windows 7), and I believe I can properly display
Japanese on my machine.

By the way, not sure if this helps,
in the mail I received, the charset has become "ANSI_X3.4-1968" instead
of "UTF-8".
Though I think the mis-conversion may be happened before sending the mail.

Chen

On 2015/10/20 19:52, Justin Clark-Casey wrote:

> Just to check, I presume that the font on your machine that this text
> uses does have the necessary glyphs for displaying Japanese? Questions
> marks are commonly subsituted when the font doesn't have the necessary
> characters.
>
> --
> Justin Clark-Casey, Synbiomine/InterMine Software Developer
> http://synbiomine.org
> http://twitter.com/justincc
>
> On 20/10/15 08:34, Chen, Yian wrote:
>> Hi all,
>>
>> I got an enquiry in Japanese via the contact form and the context
>> couldn't show properly (become question marks).
>> I have tried to look into ContactForm and ContactAction classes but I
>> didn't get any hint.
>> I have also tried to print out the form content from the HttpRequest,
>> the data was there and was urlencoded.
>> However, when trying to getParameter from the HttpRequest, the
>> content became question marks.
>>
>> Any idea to solve this problem?
>>
>> Thanks in advance.
>>
>> Chen
>>
>>
>> _______________________________________________
>> dev mailing list
>> [hidden email]
>> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>
> _______________________________________________
> dev mailing list
> [hidden email]
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev


--
Chen, Yian
[hidden email]
Postdoctoral Fellow
Bioinformatics project
National Institutes of Biomedical Innovation, Health and Nutrition
7-6-8 Saito-Asagi, Ibaraki, Osaka 567-0085, Japan


_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Text encoding in the contact form (feedback form)

Justin Clark-Casey
Hi Chen.  So, I just pasted in a random selection of Japanese characters

現在、新卒採用及び中途採用を行っております

(I sincerely hope this isn't rude, I think it's something to do with cheese) into my mine instance at synbiomine.org (which is on InterMine 1.5.3) and got it
back in both the subject line and message body to my e-mail without any issues.

I'm not sure how to test further.  Perhaps if you are in contact with the original submitter you could ask him if he is happy to forward the original e-mail (or
similar) on to me so I could test those specific characters locally?

--
Justin Clark-Casey, Synbiomine/InterMine Software Developer
http://synbiomine.org
http://twitter.com/justincc

On 21/10/15 02:09, Chen, Yian wrote:

> Hi Justin,
>
> Thanks for your reply.
> I am using Japanese OS (Windows 7), and I believe I can properly display Japanese on my machine.
>
> By the way, not sure if this helps,
> in the mail I received, the charset has become "ANSI_X3.4-1968" instead of "UTF-8".
> Though I think the mis-conversion may be happened before sending the mail.
>
> Chen
>
> On 2015/10/20 19:52, Justin Clark-Casey wrote:
>> Just to check, I presume that the font on your machine that this text uses does have the necessary glyphs for displaying Japanese? Questions marks are
>> commonly subsituted when the font doesn't have the necessary characters.
>>
>> --
>> Justin Clark-Casey, Synbiomine/InterMine Software Developer
>> http://synbiomine.org
>> http://twitter.com/justincc
>>
>> On 20/10/15 08:34, Chen, Yian wrote:
>>> Hi all,
>>>
>>> I got an enquiry in Japanese via the contact form and the context couldn't show properly (become question marks).
>>> I have tried to look into ContactForm and ContactAction classes but I didn't get any hint.
>>> I have also tried to print out the form content from the HttpRequest, the data was there and was urlencoded.
>>> However, when trying to getParameter from the HttpRequest, the content became question marks.
>>>
>>> Any idea to solve this problem?
>>>
>>> Thanks in advance.
>>>
>>> Chen
>>>
>>>
>>> _______________________________________________
>>> dev mailing list
>>> [hidden email]
>>> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>>
>> _______________________________________________
>> dev mailing list
>> [hidden email]
>> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>
>

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev