Ghi chú đến thành viên
Gởi Ãá» Tài Má»›i Trả lá»i
 
Ãiá»u Chỉnh
  #1  
Old 07-08-2008, 01:58 PM
benelli's Avatar
benelli benelli is offline
Nhập Môn Tu Luyện
 
Tham gia: Jun 2008
Äến từ: ha long
Bài gởi: 95
Thá»i gian online: 17 giá» 23 phút 48 giây
Xu: 0
Thanks: 4
Thanked 1 Time in 1 Post
Lá»±a chá»n phÆ°Æ¡ng pháp mã hoá ký tá»± unicode

1. Vai trò của mã hoá dựng sẵn và tổ hợp trong Unicode:


Dá»±ng sẵn và tổ hợp trong Unicode Ä‘á»u hợp lệ, Ä‘á»u có thể phát triển các ứng dụng Ä‘a ngữ, Ä‘á»u thể hiện được các đặc Ä‘iểm vá» ngôn ngữ nhÆ° nhau, Ä‘á»u có thể áp dụng trong tÆ°Æ¡ng lai gần cÅ©ng nhÆ° tÆ°Æ¡ng lai xa.


2. Mã hoá ký tự và đặc điểm tổ hợp của ngôn ngữ là 2 vấn đỠtách biệt.


Các đặc Ä‘iểm ngôn ngữ phục vụ cho ngÆ°á»i dùng đầu cuối, mã hoá ký tá»± dành cho các nhà kỹ thuật và phải trong suốt đối vá»›i ngÆ°á»i dùng. Sau khi mã hoá thành dạng nhị phân các đặc Ä‘iểm vá» ngôn ngữ không còn được bảo tồn.


3. Quy định vá» mã hoá Unicode trong môi trÆ°á»ng Web (HTML, XML) của W3C:


W3c dùng dạng chuẩn hoá NFC là dạng chuẩn hoá thuần dựng sẵn (Xem phụ lục 9.2).


4. Các ngôn ngữ thuá»™c há» Latin Ä‘á»u dùng Unicode dá»±ng sẵn.




o Các ngôn ngữ châu âu thuá»™c há» Latin: Pháp, Äức, Hung, Rumani... Ä‘á»u dùng dá»±ng sẵn.
o Tiếng Việt cũng thuộc hỠLatin, không phải hỠComplex Script như Thái, Ả rập...
o Tiếng Trung Unicode cÅ©ng dùng dạng dá»±ng sẵn (mặc dù đặc Ä‘iểm hình thái ngôn ngữ là tổ hợp từ 218 bá»™) trong môi trÆ°á»ng Windows và Linux.




1. Kỹ thuật cài đặt mã tổ hợp phức tạp




o Kỹ thuật cài đặt mã tổ hợp rất phức tạp chÆ°a thá»±c hiện được tốt ở nhiá»u môi trÆ°á»ng (đặc biệt vấn Ä‘á» hiển thị và in ấn - dấu và chữ bị lệch nhau).
o Ngay trong môi trÆ°á»ng Microsoft Windows cÅ©ng không tÆ°Æ¡ng Ä‘Æ°Æ¡ng nhau, Windows 95, 98, Pocket PC2002 (PDA) há»— trợ Unicode tổ hợp rất kém.



Bảng phân tích vá» há»— trợ hiển thị Unicode dá»±ng sẵn và tổ hợp trong các môi trÆ°á»ng, "0" là ký hiệu thá»±c hiện hiển thị kém hoặc không thá»±c hiện được.
VỠsự quyết định chỉ hỗ trợ Unicode tổ hợp của Microsoft



o Sá»± khác biệt giữa há»— trợ và không há»— trợ là khả năng chuyển đổi chữ hoa/chữ thÆ°á»ng, sắp xếp...Các tính năng này không có đối vá»›i Unicode dá»±ng sẵn trong MS Office 2K, XP không phải là nhược Ä‘iểm của Unicode dá»±ng sẵn mà là hạn chế của chính những phần má»m này. Trái vá»›i quyết định của MS VN không há»— trợ dá»±ng sẵn, theo tác giả Phạm Kim Long (tác giả Unikey – (http://unikey.sourceforge.net/forum/viewtopic.php?t=212) thì hệ Ä‘iá»u hành Windows 2000, XP há»— trợ tổ hợp và dá»±ng sẵn nhÆ° nhau – có phần má»m kiểm chứng.
o Mã tổ hợp của Microsoft là CP1258 được phát triển từ năm 1995 có sản phẩm là Windows 95 tiếng Việt được đầu tÆ° rất lá»›n nhÆ°ng đã không được thị trÆ°á»ng Việt Nam chấp nhận (không phải công ty lá»›n bao giá» cÅ©ng đúng).
o Mã Unicode tổ hợp được Microsoft phát triển từ năm 2000 nhưng cũng chưa được sử dụng rộng rãi ở Việt Nam (xem bảng phân tích dưới).
o TrÆ°á»›c năm 2000, các bá»™ mã tiếng Việt nhÆ° TCVN3, VNI... Ä‘á»u không được Microsoft há»— trợ, nhÆ°ng CNTT Việt Nam vẫn phát triển, các vấn Ä‘á» vá» ngôn ngữ Ä‘á»u được các tổ chức trong nÆ°á»›c thá»±c hiện.
o Linux là định hÆ°á»›ng chiến lược của nhà nÆ°á»›c (Bá»™ KHCN, ÄỠán 112) há»— trợ Unicode dá»±ng sẵn vá»›i tất các các tính năng mà MS Windows có. Linux có thể thay thế má»™t phần sản phẩm của MS Windows trong tÆ°Æ¡ng lai.





1. Chuyển đổi sang Unicode tổ hợp cần kinh phí rất lớn và phức tạp.




o Theo tính toán của giám đốc công ty VASC, cần phải 130 triệu USD (gấp đôi kinh phí cho đỠán 112) để chuyển sang dùng Unicode tổ hợp http://www.itoday.com.vn/itoday/unic..._tluan_nat.htm, theo http://vnexpress.net , con số chi phí cho bản quyá»n có thể lên đến hÆ¡n 250 triệu USD. Kinh phí nâng cấp phần cứng để chạy được Windows 2000, XP còn lá»›n hÆ¡n nữa.
o Cài đặt Unicode tổ hợp phức tạp, quá trình chuyển đổi (upgrade) từ Windows 9x sang Windows 2000, XP rất phức tạp, tốn thá»i gian, công sức.





1. Thá»±c tế hầu nhÆ° tất cả (99.7%) các trang Web Unicode Ä‘á»u dùng dá»±ng sẵn:


Thí nghiệm: tìm các trang Web tiếng Việt (ở Việt Nam cÅ©ng nhÆ° ở nÆ°á»›c ngoài Ä‘á»u) qua máy tìm kiếm google cho cả 2 kiểu mã hoá dá»±ng sẵn và tổ hợp. TrÆ°á»ng hợp 1 và 2 tìm từ rất phổ thông là "Việt Nam", "Công nghệ" trÆ°á»ng hợp thứ 3 tìm từ có tần suất thấp là "Khuyếch đại", kết quả nhÆ° sau:




















Cụm từ tìm qua google
Số trang Dựng sẵn tìm thấy
Số trang Tổ hợp tìm thấy

"Việt Nam"
109.000 (99,68%)
348 (0.32%)

"Công nghệ"
38.600 (99,89%)
44 (0.11%)

“Khuyếch Äạiâ€
134 (100%)
0 (0%)


Kết quả cho thấy trong hơn 3 năm xuất hiện các trang Unicode trên Internet (không chỉ ở VN mà còn ở nước ngoài) thì tỷ lệ dùng mã hoá dựng sẵn chiếm tuyệt đại đa số - hơn 99%.



2. Kết luận




o Unicode dá»±ng sẵn và tổ hợp Ä‘á»u bình đẳng trong Unicode.
o Lá»±a chá»n Unicode dá»±ng sẵn hoàn toàn phù hợp vá»›i bối cảnh hiện tại cÅ©ng nhÆ° tÆ°Æ¡ng lai (99.7% các trang Web đã dùng Unicode dá»±ng sẵn), hầu nhÆ° tất cả các nÆ°á»›c thuá»™c há» Latin Ä‘á»u dùng dá»±ng sẵn.
o Chi phí cho Unicode tổ hợp tốn kém và cài đặt phức tạp.
o Không có lý do nào thuyết phục để tương lai bắt buộc phải dùng tổ hợp.
o Quyết định không há»— trợ đầy đủ Unicode dá»±ng sẵn cÅ©ng không ảnh hưởng đến quyết định của Nhà nÆ°á»›c(trÆ°á»›c đây đã từng không há»— trợ trong nhiá»u năm).






10. Phụ lục




1. VỠý kiến của đại diện Microsoft- Vũ Châu.


( http://www.i-today.com.vn/itoday/uni...u_tluan_vc.htm)



o Kết luận "Unicode consortium không khuyêÌn caÌo Ä‘iÌ£nh daÌ£ng dÆ°Ì£ng sẵn, trÆ°Ì€ phi không coÌ€n caÌch naÌ€o khaÌc đê? biểu diễn một tổ hÆ¡Ì£p kyÌ tÆ°Ì£ (Unicode FAQ)" là không chính xác, Unicode consortium không há» có khuyến cáo không dùng định dạng dá»±ng sẵn, trong Unicode FAQ không há» có thông tin này. Trái lại W3C lại quy định chỉ dùng NFC là dạng thuần dá»±ng sẵn (xem phần dÆ°á»›i).
o "CuôÌi cuÌ€ng, daÌ£ng chuẩn NFC (daÌ£ng thiÌch hÆ¡Ì£p duÌ€ng cho Web) Ä‘ã ổn Ä‘iÌ£nh – không coÌ caÌch kê´t hÆ¡Ì£p chữ caÌi mÆ¡Ìi naÌ€o coÌ thể thêm vaÌ€o Ä‘Æ°Æ¡Ì£c. ViÌ€ thêÌ, việc biểu diễn theo chuẩn NFC của bâÌt kyÌ€ chữ caÌi dÆ°Ì£ng sẵn mÆ¡Ìi naÌ€o sẽ vẫn phải duÌ€ng caÌc chuỗi phân mã. CaÌc chuôÌi phân mã naÌ€y coÌ thể Ä‘Æ°Æ¡Ì£c biểu thiÌ£ bằng caÌch kêÌt hÆ¡Ì£p caÌc chuỗi kyÌ tÆ°Ì£ trong Unicode. Việc bổ sung chữ caÌi vÆ¡Ìi dâÌu phuÌ£ để taÌ£o ra một kyÌ tÆ°Ì£ dÆ°Ì£ng sẵn mÆ¡Ìi laÌ€ không thể thÆ°Ì£c hiện Ä‘Æ°Æ¡Ì£c; vaÌ€ ngÆ°Æ¡Ì£c laÌ£i coÌ€n laÌ€m phaÌt sinh một hoặc nhiê`u kiểu chiÌnh tả mÆ¡Ìi, laÌ€m phÆ°Ìc taÌ£p quaÌ triÌ€nh thÆ°Ì£c thi Unicode maÌ€ không Ä‘em laÌ£i lÆ¡Ì£i iÌch thÆ°Ì£c sÆ°Ì£ naÌ€o)" luận Ä‘iểm này cÅ©ng không chuẩn xác, không có cÆ¡ sở (xem mục dÆ°á»›i).






1. Quy định của W3C vỠdạng chuẩn hoá


W3C là cơ quan bao gồm hơn 500 tổ chức trên toàn thế giới, chuyên nghiên cứu và đưa ra các quy định và các tiêu chuẩn trong môi trương WEB (HTML, XML).
W3C đã quy định Unicode nhÆ° là bá»™ mã ký tá»± cho HTML (HTML 4.0) và Unicode cÅ©ng được dùng cho các đặc tả vá» XML 1.0 và CSS 2.0. XML là ngôn ngữ mở rá»™ng của HTML và là ngôn ngữ trao đổi dữ liệu rất quan trá»ng trong các ứng dụng Web-based và Web service.
Các dạng chuẩn hoá được quy định trong phụ chương 15 của tiêu chuẩn Unicode, Phiên bản 3.2.0 (http://www.unicode.org/unicode/reports/tr15) , Tác giả: Mark Davis (mark.davis@us.ibm.com ), Martin Dürst (duerst@w3.org), Ngày: 26/3/2002 bao gồm:























Dạng chuẩn hoá
Mô tả
Tham khảo

Normalization Form D (NFD)
chuẩn hoá thuần tổ hợp
TC Unicode mục 3.6, 3.10, 3.11, phục chương 4

Normalization Form C (NFC)
chuẩn hoá thuần dựng sẵn
Phụ chương Unicode 15, mục 5

Normalization Form KD (NFKD)
chuẩn hoá thuần tổ hợp, phân rã ký tự tương đương
TC Unicode mục 3.6, 3.10, 3.11, phục chương 4

Normalization Form KD (NFKD)
chuẩn hoá thuần dựng sẵn, phân rã ký tự tương đương
Phụ chương Unicode 15, mục 5


Mô hình ký tá»± trong môi trÆ°á»ng Web (The W3C Character Model for the World Wide Web http://www.w3.org/TR/charmod/ ) quy định dùng NFC (chuẩn hoá thuần dá»±ng sẵn) cho XML và các chuẩn liên quan.

4.1.3 Lá»±a chá»n dạng chuẩn hoá C (Normalization Form C) - Dịch toàn văn.
Unicode đưa ra 4 dạng chuẩn hoá, các dạng này khác nhau ở 1) chúng đưa các ký tự trong chuỗi text vỠdạng tổ hợp-decomposed characters (NFD, NFKD) hay dạng dựng sẵn - precomposed characters (NFC, NFKC), 2) chúng có chuẩn hoá các dạng tương thích (NFKD, NFKC) hay không (NFD, NFC).
Trong môi trÆ°á»ng Web, má»™t Ä‘iá»u quan trá»ng là không được để mất cái gá»i là sá»± khác biệt tÆ°Æ¡ng thích, do đó các dạng chuẩn hoá có chữ ‘K’ sẽ không được quan tâm nữa. Trong 2 dạng còn lại, NFC có má»™t Æ°u Ä‘iểm là hầu nhÆ° tất cả các dữ liệu cÅ© (legacy data) cÅ©ng nhÆ° dữ liệu má»›i được tạo ra từ các hệ thống hiện hành Ä‘á»u đã Ä‘ang ở dạng này. NFC có Æ°u Ä‘iểm là nhá» gá»n hÆ¡n đồng thá»i cÅ©ng phù hợp hÆ¡n vá»›i quan niệm của ngÆ°á»i dùng khi nhìn nhận vá» góc Ä‘á»™ hiển thị của ký tá»±. Do đó NFC đã được chá»n nhÆ° là cÆ¡ sở cho các vấn Ä‘á» chuẩn hoá ký tá»± đối vá»›i môi trÆ°á»ng Web.
Tóm lại, NFC được định nghia rằng má»i chuá»—i ký tá»± tổ hợp (bao gồm ký tá»± cÆ¡ sở và má»™t hay nhiá»u ký tá»± tổ hợp Ä‘i sau đó) Ä‘á»u được thay trong má»i trÆ°á»ng hợp có thể bằng má»™t ký tá»± dá»±ng sẵn chính tắc tÆ°Æ¡ng Ä‘Æ°Æ¡ng. Äoạn văn bản Text trong dạng NFC sẽ không chứa bất kỳ ký tá»± tổ hợp nào có thể thay thế bởi ký tá»± dá»±ng sẵn.
Character Model for the World Wide Web 1.0
URL: http://www.w3.org/TR/charmod/
The World Wide Web Consortium (W3C) develops interoperable technologies (specifications, guidelines, software, and tools) to lead the Web to its full potential. W3C has around 500 Member organizations from all over the world and has earned international recognition for its contributions to the growth of the Web.

This document is published as part of the W3C Internationalization Activity by the Internationalization Working Group, with the help of the Internationalization Interest Group.
4.1.3 The choice of Normalization Form C
The Unicode Consortium provides four standard normalization forms (see Unicode Normalization Forms [UTR #15]). These forms differ in 1) whether they normalize towards decomposed characters (NFD, NFKD) or precomposed characters (NFC, NFKC) and 2) whether they normalize away compatibility distinctions (NFKD, NFKC) or not (NFD, NFC).

For use on the Web, it is important not to lose the so-called compatibility distinctions, which may be important (see [UXML] for a discussion). The K normalization forms are therefore excluded. Among the remaining two forms, NFC has the advantage that almost all legacy data (if transcoded trivially, one-to-one) as well as data created by current software is already in this form; NFC also has a slight compactness advantage and a better match to user expectations with respect to the character vs grapheme issue. This document therefore chooses NFC as the base for Web-related text normalization.
NOTE: Roughly speaking, NFC is defined such that each combining character sequence (a base character followed by one or more combining characters) is replaced, as far as possible, by a canonically equivalent precomposed character. Text in a Unicode encoding form is said to be in NFC if it doesn t contain any combining sequence that could be replaced and if any remaining combining sequence is in canonical order.
For a list of programming resources related to normalization, see D Resources for Normalization.




2. Một số ưu điểm của mã hoá dựng sẵn theo tác giả Richard Gillam


(Sách Unicode Demystified – Trang 60-Richard Gillam-6, 2001).
(Lược dịch)
Ký tá»± tổ hợp có Æ°u Ä‘iểm là khả năng làm giảm không gian mã hoá và cho phép tổ hợp ký tá»± bất kỳ có dấu thanh mà chúng ta có thể tưởng tượng được, nhÆ°ng mã hoá tổ hợp có má»™t loạt các nhược Ä‘iểm lá»›n là nó tốn nhiá»u không gian (sau khi mã hoá) hÆ¡n, khó xá»­ lý, đồng thá»i phải cần đến công nghệ hiển thị rất phức tạp... Chính vì lý do đó Unicode cần phải có má»™t số lượng lá»›n các ký tá»± dá»±ng sẵn.
Rất nhiá»u chuẩn mã hoá ký tá»± kể cả Latin1 (trong đó tiếng Việt cÅ©ng thuá»™c há» Latin) được dùng trong hầu hết các ngôn ngữ châu Âu không dùng mã hoá tổ hợp mà dùng mã hoá dá»±ng sẵn. Mã hoá dá»±ng sẵn có quan hệ 1-1 giữa Ä‘iểm mã và biểu diá»…n ký tá»± nên Ä‘Æ¡n giản trong xá»­ lý. Äối vá»›i các hệ Latin, việc chuyển đổi giữa Latin1 vá»›i Unicode Ä‘Æ¡n giản hÆ¡n rất nhiá»u bằng cách thêm phần bù vào mã 8-bit để thành Unicode 16-Bit. Äiá»u này sẽ không thể có dược nếu Unicode không có mã hoá dá»±ng sẵn.

Unicode Demystified – page 60-Richard Gillam-Thursday, September 6, 2001

Canonical decompositions

Combining character sequences are great for cutting down on encoding space and allowing for representation of combinations of marks you never thought of, but they have a couple of big disadvantages. They take up more space, and they’re harder to process, requiring more sophisticated display technology, among other things.

For these reasons, Unicode also contains a large number of so-called "precomposed characters," code point values representing the combination of a base character and one or more non-spacing marks. Precomposed character all fall under the heading of "compatibility characters," that is, characters that were included in Unicode for compatibility with some other character encoding standard.
Many character encoding standards, including the Latin1 encoding used in most of Europe, use precomposed characters instead of combining character sequences. Users of these encodings are used to needing only a single code point to represent characters like é and ä, and implementations based on these encodings can adhere to the simple one-to-one relationship between code points and glyphs. Going to Unicode represents a significant step in either complexity or encoding size.
With Latin1, there’s the additional consideration that Latin1 forms the basis of Unicode’s
representation of the Latin alphabet. You can convert between Latin1 and Unicode simply by zero-padding to 16 bits or truncating to 8 bits. This wouldn’t be possible if Unicode didn’t have precomposed characters.
The rule in Unicode is that all precomposed characters are compatibility characters, that is, everything you can represent using precomposed characters you must also be able to represent without them. Thus, every precomposed character in Unicode has an equivalent combining character sequence. This is known as its canonical decomposition.





4. à kiến của Stefan Probst (chuyên gia tư vấn vỠCNTT của UNDP tại Việt Nam)



Trích dẫn ý kiến tại diễn đàn chuẩn CNNT của UNDP: http://www.isoc-vn.org/www/standard
All,
let me add only a bit:
1) There are more fonts available. The MS set includes around 12 fonts AFAIR.Vietnamese are "famous" for using dozens of fonts mixed together in a single document, without purpose, where in fact they would need much less.
The appearance of many Vietnamese texts (whether printed or hosted) can make a typographer get sick. "More" is not always "Better"!

2) Using a combining file format does not bring any significant advantage regarding the font tables. MS is telling a fairy tale:
"Simple" combining fonts (i.e. one glyph per Unicode character) are not usable at all: There is e.g. only a single Unicode character for each of the combining tone marks, but there are at least two glyphs in every reasonable font: one mark for the lower case characters, and another one (printed slightly higher) for the upper case characters. It is up to the SW to decide which glyph in the font to chose. And if you need already SW to "translate" from the file format to the used glyphs in the font, then this SW can do as well a translation from pre-composed file format to a combining font format. It is just a small routine more.
3) To have more combining than pre-composed font sets is no advantage:
For printing, combining characters are of too bad quality, i.e. a pre-composed font set has to be used.
On the Internet, for widest compatibility, only basic fonts should be used.
So what is the purpose of using a combining file format? For quality printing, it had anyway to be converted to a pre-composed format, and for the Internet the increased number of available fonts is no advantage.
And: it still has to be proved, that there are really significant more usable "combining" fonts available for Vietnamese. The "o+", "u+" e.g. are typical Vietnamese characters. If a designer adds those, then he does it for the Vietnamese users. He can then also add the other "special" Vietnamese characters (i.e. the pre-composed ones).
4) Vietnam cannot afford to do it different than the rest of the world:
If W3C adopts the present drafts (and it looks like that), then the "must have" standard for the Web is NFC, i.e. fully pre-composed. This has more ramifications than only search engines.
a) If Vietnam uses NFD (i.e. fully de-composed/combining), or "free style" ("do what you want"), then we can immediately kiss international eCommerce in Vietnamese good-bye. Example: an overseas Vietnamese orders from a Vietnamese website something, using his "international standard" SW.
However, since the Vietnamese side is setup to use the "local" standard (combining), which is incompatible with the international one (pre-composed), the order might not be accepted at all - or the wrong items might be delivered.
He might not be able to make an online payment, because the Vietnamese payment gateway does not accept his name (written in Vietnamese). Or Vietnamese cannot order from foreign sellers, because their writing (e.g.
name, address, ...) is not accepted.
The goods might be delivered to the wrong address, because the characters are interpreted differently.
b) There will be soon Domain names in Unicode characters. Of course using pre-composed characters. While the overseas community will be happily writing eMail addresses and Website addresses in "real" Vietnamese characters, the Vietnamese will be left out, because somebody decided to do it different than everybody else in the world.
You may ask why MS is pro combining characters?
Easy. Their whole system is setup like that, and they would have to do some development work to use pre-composed file format in their spell check, dictionary SW, etc. On the other side, Linux is traditionally fully pre-composed. Do you need more reasons?
Furthermore, MS Internet Explorer on Windows 9x (i.e. prior to Win2k) does a fairly bad job on NFC encoded pages. Just have a look at the test page at http://www.isoc-vn.org/www/standard/browsertest52.html . The free Mozilla browser (http://www.mozilla.org ; Release 1.2 due to be released within a few days) does a quite better job there.
Well, we are used in Vietnam to short-sighted decisions. The telephone numbering system e.g. changed about 3 times in about 5 years, i.e. you had to inform your contacts, change your stationary etc. to the new numbers, because somebody could not look for some years ahead. I would not wonder, if the standard for the next two years will be NFD/combining, and then there will be big ODA money to convert all documents and databases to NFC/pre-composed two years later, because NFD proved to be not feasible.

My 300 VND for today.
Stefan




5. Kết quả thí nghiệm tìm kiếm trang Web dựng sẵn và tổ hợp trên Internet (11-2002)



Các chủ đỠkhác cùng chuyên mục này:

Tài sản của benelli

Trả Lá»i Vá»›i Trích Dẫn
Trả lá»i

Từ khóa được google tìm thấy
ìåáåëüíûå, òàíöåâ



©2008 - 2014. Bản quyá»n thuá»™c vá» hệ thống vui chÆ¡i giải trí 4vn.euâ„¢
Diễn đàn phát triển dựa trên sự đóng góp của tất cả các thành viên
Tất cả các bài viết tại 4vn.eu thuá»™c quyá»n sở hữu của ngÆ°á»i đăng bài
Vui lòng ghi rõ nguồn gốc khi các bạn sử dụng thông tin tại 4vn.eu™