aboutsummaryrefslogtreecommitdiffstats
path: root/src/hex.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-06-19 09:20:23 +0000
committerlloyd <[email protected]>2006-06-19 09:20:23 +0000
commit69ca3d65b82ab041e8df85ca3f4e63e669557607 (patch)
tree23005899d23998ada689d4babd2bfccb4d520dbe /src/hex.cpp
parent6413b5d29a781a231d2f331e4191b68fb88a27d9 (diff)
Remove the to_lower function; turns out that both uses of it
within the library were to perform case-insensitive matching, so simply implement that instead. Place all of the character set handling functions into a Charset namespace (and update all callers). Remove the iso2local/local2iso/iso2utf/utf2iso functions, replaced by the new charset transcoder stuff. Initialize the transcoder stored in the global library state upon initialization.
Diffstat (limited to 'src/hex.cpp')
-rw-r--r--src/hex.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/hex.cpp b/src/hex.cpp
index d6b710656..42825b334 100644
--- a/src/hex.cpp
+++ b/src/hex.cpp
@@ -130,8 +130,12 @@ bool Hex_Decoder::is_valid(byte in)
*************************************************/
void Hex_Decoder::handle_bad_char(byte c)
{
- if(checking == NONE) return;
- if((checking == IGNORE_WS) && is_space(c)) return;
+ if(checking == NONE)
+ return;
+
+ if((checking == IGNORE_WS) && Charset::is_space(c))
+ return;
+
throw Decoding_Error("Hex_Decoder: Invalid hex character: " +
to_string(c));
}