Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UTF-7 on website?

We are in the process of converting our Windows-1252 based webshop to Unicode. Unfortunately we currently have to use a middleware between the shop and the ERP which cannot handle UTF-8 (it will corrupt the characters).

We could use UTF-7 for passing the content through the middleware but I'd like to avoid having to convert all data before it enters and exits the middleware.

This is why I thought of using UTF-7 alltogehter. Is there a technical reason not to use UTF-7 on your website?

like image 560
ooxi Avatar asked Dec 12 '22 08:12

ooxi


2 Answers

HTML5 forbids the support of UTF-7 by browsers :

Furthermore, authors must not use the CESU-8, UTF-7, BOCU-1 and SCSU encodings, which also fall into this category; these encodings were never intended for use for Web content.

...

User agents must support the encodings defined in the WHATWG Encoding standard. User agents should not support other encodings.

User agents must not support the CESU-8, UTF-7, BOCU-1 and SCSU encodings. [CESU8] [UTF7] [BOCU1] [SCSU]

An extract from the list of character encodings supported by Firefox :

UTF-7 Obsolete since Gecko 5.0 Unicode Support removed for HTML5 compatibility.

Don't use UTF-7.

BTW having a middleware which supports UTF-7 but not UTF-8 looks strange. Maybe this middleware can handle the files as binary ? In any case your middleware might be a little too old to be in use now.

like image 198
Denys Séguret Avatar answered Jun 03 '23 01:06

Denys Séguret


Current versions of Chrome, Firefox, and IE do not support UTF-7 at all (they render an UTF-7 encoded HTML document by displaying its source code as such, since they do not recognize any tags). This is a sufficient reason for not even considering the use of UTF-7 on the web.

like image 38
Jukka K. Korpela Avatar answered Jun 03 '23 03:06

Jukka K. Korpela