Active
Project:
Japanese Mobile
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2009 at 02:00 UTC
Updated:
14 Nov 2009 at 02:54 UTC
Hi Mr Jazzcat,
I have been building a PC/keitai site using the J-helper and after finally getting Drupal to obey my commands in the mark up ;) I had a lot of trouble with the Docomo test phones rendering the html properly.
I boiled down to the header in the docomo_header.inc
This was failing:
header('Content-Type: application/xhtml+xml; charset=shift_jis');
But when changed to this it works:
header('Content-Type: text/html; charset=shift_jis');
Do you know anymore about this, because I guess docomo must have worked for you...
Comments
Comment #1
jajathejazzcat commentedHi Bensbury,
Can you let me know which model it didn't work? I probably don't own your model and won't be able to test, but it would be nice to keep it for a record to help others. I've used the application/xhtml+xml header for a live site and haven't received a complaint from a customer yet.
The reason I use application/xhtml+xml rather than text/html is that css (in-line css btw) doesn't properly work on Docomo phones otherwise.
I doubt Docomo phones really use an xml engine for rendering pages, but it's just one of Docomo phones' quirkiness.
You might encounter a problem if you use PC browser's extension emulator for development. Even if your emulator fakes itself as a Docomo phone, it still uses the underlying browser's rendering engine, which might produce an xml parsing error.
Comment #2
Bensbury commentedHi Mr Jazzcat,
The phones used for testing were N705iu and a F90LiS
Also I had it tested by someone else on the Docomo mobile emulator you can download from their site and it failed on that too.
So the general opinion after that was it is dangerous to use xhml/+xml on docomo.
Comment #3
jajathejazzcat commentedHi Bensbury,
Thanks for sharing the information.
I couldn't test on those particular phones as I don't own them, but I've double-checked on the Docomo emulator (i-mode HTML simulator II). The header application/xhtml+xml works fine on the emulator. Also, as soon as I change the header to text/html, CSS becomes ineffective.
I've also tested on the real phone (SH700i), and the result was the same.
I'm not sure if some Docomo phones don't like application/xhtml+xml, but if you go to the mobile page of, say google.co.jp and view the page source, it uses application/xhtml+xml. So I don't think the general approach of using application/xhtml+xml for docomo phones has changed.
How did you manage to display CSS on Docomo phones without the use of application/xhtml+xml?
Comment #4
Bensbury commentedHey,
I'll take another look at it when I get the chance.
My friend who used the html simulator is tidying up the templates for us now so I can ask him.
When we used xhtml/xml the phone stopped obeying body tag links and alignment.
That maybe due to the css switch.
One of the mobile chaps at work looked at it, fiddled about and then eventually slew the xhtml+xml tag and it all worked out.
Also it was doing something strange to the marquee.
It could all be to do with the way the page was built.
Generally with docomo I am told not to use css in order to support older models.
CSS for softbank and au. That's the law of the office so I am in no real position to challenge the J knowledge of the Japanese mobile guys on it, and I'm new to Japanese mobile.
I just kind of do what works.
There was a bit of confusion over why it wasn't working though, before he changed the headers, so there maybe something in that.