The Image CAPTCHA configuration allows changing the set of available characters and the font. When trying to use any non-ASCII characters (eg. ordinal values 128 and higher), the image is not generated. This despite the font file does contain the characters.

As Drupal is based on UTF-8, I think that the CAPTCHA should also support non-ASCII characters. Some users are not that familiar with English, and find it difficult to recognize distorted English letters. Limiting the characters to digits only will make the system easy pray for bots.

While at it, maybe the CAPTCHA character set should be per-language ie., defined in the language files?

Regards,

EZ.

Comments

soxofaan’s picture

Component: Miscellaneous » Code
Status: Active » Needs review
StatusFileSize
new4.1 KB

This patch makes the image captcha more utf8 friendly.
Image captcha now works (images get generated, right answer get accepted) with non-ascii characters I can generate with my keyboard (é, ö, ü, è, ç, ä, ï, etc)

robloach’s picture

Anyone else mind reviewing this? Although I tried it and it seemed to work, I don't really have much knowledge on the subject.

soxofaan’s picture

StatusFileSize
new4.1 KB

I reworked my patch a bit:
Added more documentation, made code more clear, added handling of error situation with illegal bytes.

soxofaan’s picture

StatusFileSize
new4.65 KB

new version of patch against image_captcha.module version 1.1.4.10

soxofaan’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)