/[projects]/smsdaemon/Util.cpp
ViewVC logotype

Diff of /smsdaemon/Util.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 182 by torben, Mon Dec 8 21:49:49 2008 UTC revision 183 by torben, Fri Dec 12 13:57:10 2008 UTC
# Line 168  namespace Util Line 168  namespace Util
168                  return retval;                  return retval;
169          }          }
170    
171          char my_toupper(char ch)          char danish_map[3][2] = { {198,230}, {216,248}, {197,229} }; // aelig, oslash, aring
172    
173            unsigned char my_toupper(unsigned char ch)
174          {          {
175                  if (ch == 'æ')                  if (ch == 230)
176                          return 'Æ';                          return 198;
177                  if (ch == 'ø')                  if (ch == 248)
178                          return 'Ø';                          return 216;
179                  if (ch == 'å')                  if (ch == 229)
180                          return 'Å';                          return 197;
181    
182                  return ::toupper(ch);                  return ::toupper(ch);
183          }          }
184    
185          char my_tolower(char ch)          unsigned char my_tolower(unsigned char ch)
186          {          {
187                  if (ch == 'Æ')                  if (ch == 198)
188                          return 'æ';                          return 230;
189                  if (ch == 'Ø')                  if (ch == 216)
190                          return 'ø';                          return 248;
191                  if (ch == 'Å')                  if (ch == 197)
192                          return 'å';                          return 229;
193    
194                  return ::tolower(ch);                  return ::tolower(ch);
195          }          }

Legend:
Removed from v.182  
changed lines
  Added in v.183

  ViewVC Help
Powered by ViewVC 1.1.20