[sane-devel] Schedule for release of sane-backends 1.0.24
Olaf Meeuwissen
olaf.meeuwissen at avasys.jp
Mon Aug 26 01:15:37 UTC 2013
m. allan noah writes:
> No, this is a good issue to discuss. I wonder, can the Turkish
> keyboard make the capitol 'I'? If not, then what is the correct fix?
A lot of string functions do take the current locale into account when
doing their thing, so the correct fix is to use the right locale before
calling toupper().
IIRC, backend names are expected to be valid C identifiers which means
they are ASCII. Setting the LC_CTYPE to "C" before use of toupper() and
reverting when done should fix this issue. Patch attached.
>> [...]
>> This is due to limitation of toupper() function w.r.t. character 'i' when
>> locale is set to turkish.
>> As toupper('i') is 'i' (i.e. still the small i) ,the SANE_DEBUG_RICOH etc
>> would not work correctly.
>>
>> Root cause:
>> Env variable set by user as mentioned in the man page is as below
>> export SANE_DEBUG_RICOH=4
>>
>> Sane's search logic's final string generated for ricoh backend would be
>> SANE_DEBUG_RiCOH --->note mismatch for i
>> [...]
Hope this helps,
--
Olaf Meeuwissen, LPIC-2 FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962 Help support software freedom
http://www.fsf.org/jf?referrer=1962
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-C-LC_CTYPE-when-converting-backend-names-to-env-.patch
Type: text/x-diff
Size: 1157 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130826/2543ff6a/attachment.patch>
More information about the sane-devel
mailing list