Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Unified Diff: trunk/Source/wtf/text/TextEncoding.cpp

Issue 26184004: Revert 158972 "Canonical name change: windows-949 => EUC-KR" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/Source/wtf/text/TextEncoding.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/wtf/text/TextEncoding.cpp
===================================================================
--- trunk/Source/wtf/text/TextEncoding.cpp (revision 159022)
+++ trunk/Source/wtf/text/TextEncoding.cpp (working copy)
@@ -120,6 +120,24 @@
return newTextCodec(*this)->encode(source, length, handling);
}
+const char* TextEncoding::domName() const
+{
+ if (noExtendedTextEncodingNameUsed())
+ return m_name;
+
+ // We treat EUC-KR as windows-949 (its superset), but need to expose
+ // the name 'EUC-KR' because the name 'windows-949' is not recognized by
+ // most Korean web servers even though they do use the encoding
+ // 'windows-949' with the name 'EUC-KR'.
+ // FIXME: This is not thread-safe. At the moment, this function is
+ // only accessed in a single thread, but eventually has to be made
+ // thread-safe along with usesVisualOrdering().
+ static const char* const a = atomicCanonicalTextEncodingName("windows-949");
+ if (m_name == a)
+ return "EUC-KR";
+ return m_name;
+}
+
bool TextEncoding::usesVisualOrdering() const
{
if (noExtendedTextEncodingNameUsed())
« no previous file with comments | « trunk/Source/wtf/text/TextEncoding.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698