home *** CD-ROM | disk | FTP | other *** search
/ ftp.rarlab.com / 2014.05.ftp.rarlab.com.tar / ftp.rarlab.com / rar / sunrar.zip / loctoup.eng < prev    next >
Text File  |  1998-07-01  |  886b  |  23 lines

  1. /* Converts a character to upper case with regard to particular language rules
  2.  
  3.    This has caused some confusion amongst the non-programmers amongst you.
  4.    Some languages, Spanish, Swedish, Finnish, Danish and others use
  5.    characters which are not in the range 32 - 127 decimal and therefore the
  6.    standard algorithm to convert to Uppercase needs to be modified.
  7.  
  8.    The example given below (commented) is of the Spanish conversion, but
  9.    simply lists the characters which need to be handled in a special way.
  10.    To modify for YOUR local language, simply replace the lower and
  11.    Upper-case special characters with your own and add or delete case
  12.    statements so that you have covered ALL the special characters in your
  13.    language.  Don't forget to uncomment the lines which you have changed.
  14. */
  15.  
  16. int loctoupper(int ch)
  17. {
  18.   if (ch<130)
  19.     return(toupper(ch));
  20.   return (ch);
  21. }
  22.  
  23.