Skip to content

Commit

Permalink
integrated a bugfix for tclrega and tclrpc which will always convert all
Browse files Browse the repository at this point in the history
input data to iso-8859-1 encoding rather than just in case the identity
encoding is not used. This should fix certain umlaut encoding issues
that could either be seen in the WebUI when renaming devices/channels,
but also when using the rega scripting or rpc api with remote calls and
utf-8 encoded names containing umlaut characters. This fixes #1821.
  • Loading branch information
jens-maus committed May 3, 2022
1 parent b101d91 commit 5e0ab71
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
10 changes: 4 additions & 6 deletions buildroot-external/package/tclrega/tclrega.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
/*# Definitionen #*/
/*############################################################################*/

#define TCLREGA_VERSION "1.2"
#define TCLREGA_VERSION "1.3"

/*############################################################################*/
/*# Variablen #*/
Expand Down Expand Up @@ -141,11 +141,9 @@ int Tclrega_Init (Tcl_Interp* interp) {
/* - - - wernerf - - - */
Tcl_SetVar(interp, "rega_version", TCLREGA_VERSION, TCL_GLOBAL_ONLY);

// get the system encoding and then convert to iso8859-1 in
// case the system encoding is not "identity"
if(strcasecmp(Tcl_GetEncodingName(NULL), "identity") != 0) {
iso8859_encoding = Tcl_GetEncoding(interp, "iso8859-1");
}
// get iso8859-1 encoding to convert all stuff to latin1
// because rega can only handle iso-8859-1
iso8859_encoding = Tcl_GetEncoding(interp, "iso8859-1");

// create an exit handler to clean up afterwards
Tcl_CreateExitHandler( Tclrega_Exit, 0 );
Expand Down
2 changes: 1 addition & 1 deletion buildroot-external/package/tclrega/tclrega.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
################################################################################

TCLREGA_VERSION = 1.2
TCLREGA_VERSION = 1.3
TCLREGA_SITE = $(BR2_EXTERNAL_EQ3_PATH)/package/tclrega
TCLREGA_SITE_METHOD = local
TCLREGA_LICENSE = Apache-2.0
Expand Down
10 changes: 4 additions & 6 deletions buildroot-external/package/tclrpc/tclrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

using namespace XmlRpc;

#define TCLRPC_VERSION "1.2"
#define TCLRPC_VERSION "1.3"

static const char* USAGE = "usage: xmlrpc url methodName ?arg1 ?arg2 ...??";

Expand Down Expand Up @@ -60,11 +60,9 @@ int DLLEXPORT Tclrpc_Init (Tcl_Interp* interp) {
Tcl_CreateExitHandler( Tclrpc_Exit, 0 );
XmlRpc::XmlRpcErrorHandler::setErrorHandler( &g_tclrpcErrorHandler );

// get the system encoding and then convert to iso8859-1 in
// case the system encoding is not "identity"
if(strcasecmp(Tcl_GetEncodingName(NULL), "identity") != 0) {
iso8859_encoding = Tcl_GetEncoding(interp, "iso8859-1");
}
// get iso8859-1 encoding to convert all stuff to latin1
// because rega can only handle iso-8859-1
iso8859_encoding = Tcl_GetEncoding(interp, "iso8859-1");

return TCL_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion buildroot-external/package/tclrpc/tclrpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
################################################################################

TCLRPC_VERSION = 1.2
TCLRPC_VERSION = 1.3
TCLRPC_SITE = $(BR2_EXTERNAL_EQ3_PATH)/package/tclrpc
TCLRPC_SITE_METHOD = local
TCLRPC_LICENSE = Apache-2.0
Expand Down

0 comments on commit 5e0ab71

Please sign in to comment.