Does size matter?
As you know, characters in the range U + 0080 to U + 009F occupy twice as much space in UTF-8 as in ISO-8859-1. But how often are these characters used?
In a typical Spanish text, I got from the first page of Wikipedia:
Artículo bueno
Las Vegas de la de la de Seville Simpson fue emitida originalmente por la cadena Fox entre el 17 de septiembre de 1995 y el 19 de mayo de 1996. Los productores ejecutivos de la séptima temporada fueron Bill Oakley and Josh Weinstein, quienes producirían 21 episodios de la temporada. David Mirkin Few El Show runner de los cuatro restantes, incluyendo dos vestigios que habían sido producidos para la temporada front. La séptima temporada estuvo nominada para dos Premios Primetime Emmy, incluyendo la categoría "Mejor programa animado (de duración menor a una hora)" y obtuvo un Premio Annie por "Mejor programa animado de televisión". for versioón en DVD fue lanzada a la venta en la Región 1 el 13 de diciembre de 2005, en la Región 2 el 30 de enero de 2006 y en la Región 4 el 29 de marzo del mismo año. La caja recopilatoria fue puesta a la venta en dos formatos diferentes: una caja con la forma de la cabeza de Marge y otra rectangular clásica, en la cual el dibujo muestra el estreno de una película.
At sea, there are 17 non-ASCII characters out of 1,044 ASCII characters. This means an extension of only 1.6% of the extension when encoding in UTF-8. It is hardly worth worrying, especially when all-ASCII HTML markup is considered.
(However, the difference may be significant for a more accentuated language such as Sango .)
How would your idea work?
Are you going to encode all your data in windows-1252? It does not give you globalization; the globe does not stop on the Oder River. True ISO-8859-1 (missing the euro;) is even worse; the globe does not stop on the English Channel.
Tag text with its encoding? This works for XML, HTML and SMTP. But you asked:
Does it play a crucial role in database storage?
How are you going to store mixed Latin-1 and UTF-8 strings in a database?
There are two columns of EncodedText BLOB, IsUtf8 BOOLEAN
? How are you going to ask this? Of course, you will not just look at EncodedText
and ignore IsUtf8
; this approach leads to mojibake.
You can write a view with a CASE WHEN IsUtf8 THEN EncodedText ELSE Latin1ToUtf8(EncodedText) END
and the correct INSTEAD OF INSERT
trigger, but it can cost you more bytes than it saves.