Bugs/Utf-8

From Eggdrop Wiki

(Difference between revisions)
Jump to: navigation, search
(add johannes13 script)
 
(8 intermediate revisions not shown)
Line 1: Line 1:
-
'''UGLY HACK. DO NOT USE.'''
+
This will enable your Eggdrop with UTF-8 support.
-
You know what you're doing? Ok, well, here it is.
+
Notice: Use at your own risk, as this may not solve all your encoding problems.
 +
==Patch==
 +
 +
===Step 1===
{{Changefile|file=eggdrop{{LSR/Eggdrop}}/src/main.h|line=46|text=
{{Changefile|file=eggdrop{{LSR/Eggdrop}}/src/main.h|line=46|text=
#if (((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 1)) {{!}}{{!}} (TCL_MAJOR_VERSION > 8))
#if (((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 1)) {{!}}{{!}} (TCL_MAJOR_VERSION > 8))
Line 14: Line 17:
#endif
#endif
|lang=C}}
|lang=C}}
-
 
+
===Step 2===
-
 
+
{{Changefile|file=eggdrop{{LSR/Eggdrop}}/src/tcl.c|line=650|text=
{{Changefile|file=eggdrop{{LSR/Eggdrop}}/src/tcl.c|line=650|text=
if (encoding == NULL) {
if (encoding == NULL) {
Line 23: Line 25:
encoding = "utf-8";
encoding = "utf-8";
|lang=C|insert=1}}
|lang=C|insert=1}}
 +
===Step 3===
 +
[[How to compile Eggdrop|Recompile Eggdrop]].
 +
 +
==Script==
 +
As an alternative to patching your bot with the patch above, you can also use [http://forum.egghelp.org/viewtopic.php?p=98995 this script].
 +
 +
==Known issues==
 +
 +
* Eggdrop [http://forum.egghelp.org/viewtopic.php?p=93395#93395 will not join (or stay in) UTF-8 channels].

Current revision as of 20:47, 16 January 2014

This will enable your Eggdrop with UTF-8 support.

Notice: Use at your own risk, as this may not solve all your encoding problems.

Contents

Patch

Step 1

Open the eggdrop1.6.21/src/main.h file in your editor.

Search for (around line 46)

#if (((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 1)) || (TCL_MAJOR_VERSION > 8))
#  define USE_TCL_BYTE_ARRAYS
#  define USE_TCL_ENCODING
#endif

and replace it with

#if (((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 1)) || (TCL_MAJOR_VERSION > 8))
#  undef USE_TCL_BYTE_ARRAYS
#  define USE_TCL_ENCODING
#endif

Step 2

Open the eggdrop1.6.21/src/tcl.c file in your editor.

Search for (around line 650)

if (encoding == NULL) {
  encoding = "iso8859-1";
}

and insert the following right after it

encoding = "utf-8";

Step 3

Recompile Eggdrop.

Script

As an alternative to patching your bot with the patch above, you can also use this script.

Known issues

Personal tools