Which DOCTYPE we use mobile sites which use Unicode charectors?

Can anybody help us? which DOCTYPE should we use in mobile websites which use Unicode characters?

1.)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Site Name</title>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
...

2.)

<!DOCTYPE HTML PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"><html
 xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
...

3.)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Site Name</title>
<meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=UTF-8" />

...

If we missed anything, pls let us know.

and pls add this:
a) it is mandatory use of “UTF” is in upper case?
b) Which meta tag is best?
<meta http-equiv=“content-type” content=“text/html; charset=UTF-8”>
or
<meta http-equiv=“Content-Type” content=“application/vnd.wap.xhtml+xml; charset=UTF-8” />

thanks in advance

I use this doctype:

<!DOCTYPE html PUBLIC “-//WAPFORUM//DTD XHTML Mobile 1.2//EN” “http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd”>

I would use
<meta http-equiv=“Content-Type” content=“application/vnd.wap.xhtml+xml; charset=UTF-8” />

But it is not compulsory, no. But it will just added better support

Thanks for your advice!

Have a nice day! :slight_smile:

You should use neither (IMO), it’s been well established that more mobile devices support traditional HTML and XHTML than support the limited and restricted mobile profiles which were only created as a stepping stone between WML and XHTML. But now the issue has been resolved entirely through the likes of the iPhone which has aided progression and most mobile devices have standard level support to the same extent as desktop browsers (Flash excluded), it’s pointless using the profile as it’s become redundant (even before it gained popularity or mainstream support). Simply put: Use HTML 4.01 or XHTML 1.0 and you’ll be fine. :slight_smile:

It is not critical that ‘UTF-8’ be spelt upper-case but usually it is considered the more formal way of writing it.

If you are going to be sending a fancy targeted MIME like; ‘application/xhtml+xml’ it is basically too late in the document if you send it via a META tag that won’t work it has to be sent/served prior by the HTTP Server headers, etc.

Theoretically ‘XHTML Basic 1.0’ was the preferred way for mobile devices. Since it prohibits nesting of TABLE elements and basically removes unnecessary (usually presentational) Elements and Attributes. Thus reducing processing time to cater for limited rendering and bandwidth constraints.

Albeit ‘Basic 1.1’ http://www.w3.org/TR/xhtml-basic/ seems to be a step-backwards compared to Basic 1.0 (regarding strictness). But that’s due to modern devices being more powerful and better at handling scripts, etc.

Though like Alex said; most devices now can handle more generic (x)html and it’s still good to keep markup lean.

That might be true for you, but me being ins South Africa, the more restrictive doctype is good, as most people here still use old nokia and samsung phones. Very few people have started using smartphones.

But hopefully in a few years time, things will change

Thank you very much guys!

Now, I have a few doubts guys …

All Windows Mobiles and iPhones are accept this:
<meta http-equiv=“Content-Type” content=“application/vnd.wap.xhtml+xml; charset=UTF-8” />

and yes, I have heard that plain html works well on most mobile phones. So, it is true, isn’t? (Sorry, I have not experienced in many kind of mobile sets).

If I use xhtml,which file extension is better for most type of phones?
.html ?
.htm ?
.xhtm ?
.xhtml ?
.php ?*

Is .php extension works well on most mobiles?

thanks again.

:slight_smile:

It’s not about the extension you use, it’s about the code and the MIME type which describes the file format type. You can use whatever you like, just be sure that the content-type meta tag accurately describes the format you are using. Just beware that if you’re using proper XHTML rather than HTML (such as application/xhtml+xml) then you will encounter some serious issues of browser compatibility with Internet Explorer Mobile as like Trident (desktop), it isn’t compatible. :slight_smile:

100% agree with AlexDawson.

No need for XHTML MP. There are hardly any mobile phones that don’t support HTML/XHTML.

I just use ?site=mobile or something like that to display a mobile stylesheet and the occasional bit of server side code that organises things differently.

When you design your main site, also design the mobile one. It’ll take 10% longer and that’s it. You use all the same pages and don’t really need to worry about making a mobile site look too snazzy - it’s so easy to do a mobile site.

Also, I test all devices and browsers (desktops and mobiles) on both my sites. So an Android phone can easily view my main site and mobile site to perfection.

There are some mobiles that I wouldn’t even bother testing a full site on (Blackberry and IE Mobile) - just divert these with server side code to your mobile site = most others should get a choice.

There are some real issues with some JS/CSS commands though in some browsers but you can easily design a basic mobile site with hardly any JS and reduced CSS.

Full site = all the CSS/JS you want, designed minimum 960 wide.

Mobile site = everything basic with slightly reduced content using % so it fits the screen.

IE Mobile is absolute crap. Blackberry (not the new WebKit one) has a rubbish browser. I’m not a fan of Bolt or SkyFire either but iPhone and Android are excellent.

I’ve gone off topic but I think I’ve made my point.

You would check for if Flash exists though and display either the Flash or alternate content. Again, test for Flash on all devices and both sites.