Re: feature request: utf encoding

Hyunwoo Park <[email protected]>
Newsgroups gmane.text.doxygen.devel
Message-ID <[email protected]>
Hi. :)

I also have same problem.
so, I added one more language, "english.utf8" for utf8 with attached patch file.

in doxyfile config, "OUTPUT_LANGUAGE = english.utf8" will select the english and utf8 encoding.

I think it`s very easy to make another language such as korean.utf8, french.utf8, ..., like this manner.

Regards.
Hyunwoo Park.


Peter Münster 쓴 글:
> On Sun, 26 Nov 2006, Peter Münster wrote:
> 
>> On Sat, 25 Nov 2006, Jens Seidel wrote:
>>
>>> Using UTF-8 per default would also allow to drop the stupid Use Windows
>>> encoding option in the config file.
>> Or even better: instead of
>> USE_WINDOWS_ENCODING = yes/no
>> something like
>> USE_ENCODING = utf-8/iso-8859-1/iso-8859-15/etc. (default = utf-8)
> 
> Hello and happy new year!
> 
> I've just seen, that there are already such requests in the bugzilla
> database (numbers 150916, 159291 and 330109).
> 
> Is there perhaps already a developer working on this?
> 
> Cheers, Peter
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Doxygen-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-develop
doxygen-1.4.7.en.utf8.patch (text/x-patch, 3.3 KB)
diff -urN doxygen-1.4.7/configure doxygen-1.4.7.mod/configure
--- doxygen-1.4.7/configure	2006-06-11 04:25:54.000000000 +0900
+++ doxygen-1.4.7.mod/configure	2006-08-11 00:26:12.937880613 +0900
@@ -35,7 +35,7 @@
 f_english=NO
 f_wizard=NO
 f_thread=NO
-f_langs=nl,se,cz,fr,id,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,br,dk,sk,ua,gr,tw,sr,ca,lt,za
+f_langs=en_utf8,nl,se,cz,fr,id,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,br,dk,sk,ua,gr,tw,sr,ca,lt,za
 
 while test -n "$1";  do
   case $1 in
@@ -587,7 +587,7 @@
 echo -n "  Generating src/lang_cfg.h..."
 echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>); 
         chomp @l; 
-	@allowed=(split(/,/,"NL,SE,CZ,FR,ID,IT,DE,JP,JE,ES,FI,RU,HR,PL,PT,HU,KR,KE,RO,SI,CN,NO,BR,DK,SK,UA,GR,TW,SR,CA,LT,ZA"));
+	@allowed=(split(/,/,"EN_UTF8,NL,SE,CZ,FR,ID,IT,DE,JP,JE,ES,FI,RU,HR,PL,PT,HU,KR,KE,RO,SI,CN,NO,BR,DK,SK,UA,GR,TW,SR,CA,LT,ZA"));
 	foreach my $elem (@l){ 
 	     $elem =~ tr/a-z/A-Z/;
 	     $r=0;
diff -urN doxygen-1.4.7/src/language.cpp doxygen-1.4.7.mod/src/language.cpp
--- doxygen-1.4.7/src/language.cpp	2006-05-08 03:02:31.000000000 +0900
+++ doxygen-1.4.7.mod/src/language.cpp	2006-08-11 00:19:45.166973557 +0900
@@ -22,6 +22,9 @@
 #include "translator_en.h"
 #if !defined(ENGLISH_ONLY)
 #include "translator_adapter.h"
+#ifdef LANG_EN_UTF8
+#include "translator_en.utf8.h"
+#endif
 #ifdef LANG_NL
 #include "translator_nl.h"
 #endif
@@ -144,6 +147,12 @@
     theTranslator=new TranslatorEnglish;
   }
 #if !defined(ENGLISH_ONLY)
+#ifdef LANG_EN_UTF8
+  else if (L_EQUAL("english.utf8"))
+  {
+    theTranslator=new TranslatorEnglish_utf8;
+  }
+#endif
 #ifdef LANG_NL
   else if (L_EQUAL("dutch"))
   {
diff -urN doxygen-1.4.7/src/libdoxygen.pro.in doxygen-1.4.7.mod/src/libdoxygen.pro.in
--- doxygen-1.4.7/src/libdoxygen.pro.in	2006-05-08 03:02:31.000000000 +0900
+++ doxygen-1.4.7.mod/src/libdoxygen.pro.in	2006-08-11 00:20:15.217929552 +0900
@@ -98,6 +98,7 @@
 		translator_de.h \
 		translator_dk.h \
 		translator_en.h \
+		translator_en.utf8.h \
 		translator_es.h \
 		translator_fi.h \
 		translator_fr.h \
diff -urN doxygen-1.4.7/src/translator_en.utf8.h doxygen-1.4.7.mod/src/translator_en.utf8.h
--- doxygen-1.4.7/src/translator_en.utf8.h	1970-01-01 09:00:00.000000000 +0900
+++ doxygen-1.4.7.mod/src/translator_en.utf8.h	2006-08-11 00:19:09.980218003 +0900
@@ -0,0 +1,30 @@
+/******************************************************************************
+ *
+ * 
+ *
+ * Copyright (C) 1997-2006 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby 
+ * granted. No representations are made about the suitability of this software 
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef TRANSLATOR_EN_UTF8_H
+#define TRANSLATOR_EN_UTF8_H
+
+class TranslatorEnglish_utf8 : public TranslatorEnglish
+{
+  public:
+    virtual QCString idLanguage()
+    { return "english.utf8"; }
+    virtual QCString idLanguageCharset()
+    { return "utf-8"; }
+};
+
+#endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.