Implements an image recognition captcha.

"; break; case 'admin/modules#description': case 'admin/modules/textimage': case 'admin/textimage': $output = t('Implements an image recognition captcha.'); break; } return $output; } function textimage_captchachallenge(&$form) { $form['captcha_response'] = array ( '#type' => 'textfield', '#title' => t('Captcha Validation'), '#default_value' => '', '#required' => TRUE, '#validate' => array('_captcha_validate' => array()), '#description' => t('Please type in the letters/numbers that are shown in the image above.'), '#prefix' => 'Captcha Image: you will need to recognize the text in it.', ); return $form; } function textimage_captchavalidate(&$captcha_word, &$correct) { $captcha_word = drupal_strtolower($captcha_word); if (($_SESSION['captcha'] != '') && $captcha_word == $_SESSION['captcha']) { $correct = true; } else { $correct = false; form_set_error('captcha_response', t('The image verification code you entered is incorrect.')); } } /** * Implementation of hook_menu(). */ function textimage_menu($may_cache) { $items = array(); $suffix = ''; if (arg(2)!=null) $suffix='/'.arg(2); $items[] = array( 'path' => '_textimage/image'.$suffix, 'title' => t('textimage'), 'callback' => '_textimage_image', 'access' => user_access('access textimages'), 'type' => MENU_CALLBACK ); return $items; } function textimage_perm() { return array('access textimages'); } function textimage_settings() { $fonts_path = variable_get("textimage_fonts_path", ""); $images_path = variable_get("textimage_images_path", ""); //check for GD if (!function_exists(imagecreate)) drupal_set_message(t('Image library not available. Textimage needs the GD library extension to be installed. Please install GD.')); //check for TTF support elseif (!function_exists(imagettftext)) drupal_set_message(t('Your image library does not seem to have TrueType font support. Textimage will work, but will use the default inbuilt font.'),'status'); //check for valid font path elseif ($fonts_path!="" && !is_dir($fonts_path)) drupal_set_message(t('The current font path is invalid. The default font will be used.')); //check for valid image path if ($images_path!="" && !is_dir($images_path)) drupal_set_message(t('The current images path is invalid. No images will be used.')); //Fonts settings $form['fonts'] = array( '#type' => 'fieldset', '#title' => t('Fonts settings'), '#collapsible' => TRUE, '#collapsed' => FALSE ); $form['fonts']['textimage_use_only_upper'] = array( '#type' => 'checkbox', '#title' => t('Use only Uppercase'), '#default_value' => variable_get('textimage_use_only_upper',0) ); $form['fonts']['textimage_fonts_path'] = array( '#type' => 'textfield', '#title' => t('TrueType Fonts Path'), '#default_value' => $fonts_path, '#size' => 30, '#maxlength' => 255, '#description' => t('Location of the directory where the Truetype (.ttf) fonts are stored. If you do not provide any fonts, the module will use the default font for text. Relative paths will be resolved relative to the Drupal installation directory.'), ); $form['fonts']['textimage_font_size'] = array( '#type' => 'textfield', '#title' => t('Font Size'), '#default_value' => variable_get('textimage_font_size',24), '#size' => 5, '#maxlength' => 2, '#description' => t('Font size of Captcha text (in pixels).'), '#validate' => array("_textimage_number_validate" => array("textimage_font_size")), ); $form['fonts']['textimage_char_spacing_max'] = array( '#type' => 'textfield', '#title' => t('Character Spacing'), '#default_value' => variable_get('textimage_char_spacing_max',10), '#size' => 5, '#maxlength' => 4, '#description' => t('Sets the kerning between letters in Captcha. Higher numbers indicate more spacing.'), '#validate' => array("_textimage_number_validate" => array("textimage_char_spacing_max")), ); $form['fonts']['textimage_char_jiggle_amount'] = array( '#type' => 'textfield', '#title' => t('Character Jiggle'), '#default_value' => variable_get('textimage_char_jiggle_amount',5), '#size' => 5, '#maxlength' => 2, '#description' => t('Sets the amount of up and down movement in the Captcha letters. Higher numbers indicate more jiggling.'), '#validate' => array("_textimage_number_validate" => array("textimage_char_jiggle_amount")), ); $form['fonts']['textimage_char_rotate_amount'] = array( '#type' => 'textfield', '#title' => t('Character Rotation'), '#default_value' => variable_get('textimage_char_rotate_amount',5), '#size' => 5, '#maxlength' => 2, '#description' => t('Sets the amount of rotation in the Captcha letters (in degrees, only works with non-default fonts).'), '#validate' => array("_textimage_number_validate" => array("textimage_char_rotate_amount")), ); $form['fonts']['textimage_char_size_amount'] = array( '#type' => 'textfield', '#title' => t('Character Size Adjustment'), '#default_value' => variable_get('textimage_char_size_amount',2), '#size' => 5, '#maxlength' => 2, '#description' => t('Sets the amount of variation in size between the different letters in the Captcha (in pixels).'), '#validate' => array("_textimage_number_validate" => array("textimage_char_size_amount")), ); //Image settings $form['images'] = array( '#type' => 'fieldset', '#title' => t('Image settings'), '#collapsible' => TRUE, '#collapsed' => FALSE ); $form['images']['textimage_images_path'] = array( '#type' => 'textfield', '#title' => t('Background Images Path'), '#default_value' => $images_path, '#size' => 30, '#maxlength' => 255, '#description' => t('Location of the directory where the background images are stored. If you do not provide a directory, solid colors will be used. Relative paths will be resolved relative to the Drupal installation directory.'), ); $form['images']['textimage_image_noise'] = array( '#type' => 'textfield', '#title' => t('Image Noise (pixels)'), '#default_value' => variable_get('textimage_image_noise',4), '#size' => 5, '#maxlength' => 4, '#description' => t('Sets the amount of noise (random pixels) in the Captcha image. Higher numbers indicate more noise.'), '#validate' => array("_textimage_number_validate" => array("textimage_image_noise")), ); $form['images']['textimage_image_lines'] = array( '#type' => 'textfield', '#title' => t('Image Noise (lines)'), '#default_value' => variable_get('textimage_image_lines',4), '#size' => 5, '#maxlength' => 4, '#description' => t('Sets the amount of noise (random lines) in the Captcha image. Higher numbers indicate more noise.'), '#validate' => array("_textimage_number_validate" => array("textimage_image_lines")), ); $form['images']['textimage_image_margin'] = array( '#type' => 'textfield', '#title' => t('Image Margin'), '#default_value' => variable_get('textimage_image_margin',10), '#size' => 5, '#maxlength' => 4, '#description' => t('Set a distance between the Captcha letters and the edges of the image.'), '#validate' => array("_textimage_number_validate" => array("textimage_image_margin")), ); $form['info'] = array( '#type' => 'fieldset', '#title' => t('Image and font information'), '#collapsible' => TRUE, '#collapsed' => FALSE ); if (isset($fonts_path)) { $imagefontinfo .= t('Number of fonts found: ').count(_textimage_font_list()); } if (isset($images_path)) { $imagefontinfo .= '
'.t('Number of background images found: ').count(_textimage_image_list()); } $gdinfo = gd_info(); $imagefontinfo .= '
'.t('GD Version: ').$gdinfo["GD Version"]; $imagefontinfo .= '
'.t(' FreeType Support: '); $imagefontinfo .= ($gdinfo["FreeType Support"]==true) ? 'True' : 'False'; $imagefontinfo .= '
'; $form['info']['captcha_info'] = array ( '#type' => 'item', '#value' => $imagefontinfo, ); return $form; } function textimage_settings_form_validate ($form_id,$form) { //check for valid font path if ($form['textimage_fonts_path'] !="" && !is_dir($form['textimage_fonts_path'])) form_set_error('textimage_fonts_path', t('The entered font path is invalid')); //check for valid image path if ($form['textimage_images_path'] !="" && !is_dir($form['textimage_images_path'])) form_set_error('textimage_images_path', t('The entered image path is invalid')); } function _textimage_number_validate ($field,$fieldName) { if (!is_numeric($field['#value'])) { form_set_error($fieldName,t("The value for")." ".t($field['#title'])." ".t("must be a number")); } } /** * Prints an image containing a textimage code. */ function _textimage_image() { //if we don't have GD2 functions, we can't generate the image if (!function_exists('imagecreatetruecolor')) return; // Set headers header('Expires: Mon, 01 Jan 1997 05:00:00 GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: post-check=0, pre-check=0', false); header('Pragma: no-cache'); header('Content-type: image/png'); $string = _textimage_code(); // Get truetype font list $fonts = _textimage_font_list(); // Get the background images list $images = _textimage_image_list(); // Randomization amounts: $charSpacingMax = variable_get('textimage_char_spacing_max',10); // Letter spacing max (pixels) $charSpacingMin = max($charSpacingMax*.5,0); // Letter spacing minimum (pixels) $charJiggleAmount = variable_get('textimage_char_jiggle_amount',5); // Up and down randomization (pixels) $charRotateAmount = variable_get('textimage_char_rotate_amount',5); // Character rotation amount (degrees) $charSizeAmount = variable_get('textimage_char_size_amount',2); // Character size amount (pixels) $imageRotateAmount = variable_get('captcha_image_rotate_amount',12); // Image rotation amount (degrees) // Static amounts: $charInitialSize = variable_get('textimage_font_size',24); // Initial Font $imageNoise = variable_get('textimage_image_noise',4); // Amount of noise added to image $imageLines = variable_get('textimage_image_lines',4); // Amount of noise added to image $imageMargin = variable_get('textimage_image_margin',10); // Margin around image (pixels) // write text using a truetype font if (function_exists(imagettftext) && count($fonts) > 0) { // Initialize variables for the loop $characterDetails = array(); // contains the final info about each character // Build a list of character settings for the captcha string for ($i=0;$i $charSize, "angle" => $charAngle, "x" => $x, "y" => $y, "color" => $foreground, "font" => $font, "char" => $char ); // Increment the image size $imageWidth = $x + $charWidth; $imageHeight = max($imageHeight,$y+$charJiggleAmount); } // Create the image based off the string length and margin if (count($images) > 0) { // We're going to be using an image, and need a tranparent background to start with $im = _textimage_create_transparent_image($imageWidth+2*$imageMargin, $imageHeight+2*$imageMargin); $noisecolor = imagecolorallocatealpha($im, 0, 0, 0, 127); } else { // Just make a plain-jane color brackground $im = imagecreatetruecolor($imageWidth+2*$imageMargin, $imageHeight+2*$imageMargin); $background = imagecolorallocate($im, rand(180, 250), rand(180, 250), rand(180, 250)); $noisecolor = $background; imagefill($im, 0, 0, $background); } // Specify colors to be used in the image $foreground = imagecolorallocate($im, rand(0, 80), rand(0, 80), rand(0, 80)); foreach($characterDetails as $char) { // draw character imagettftext($im,$char['size'],$char['angle'],$char['x']+$imageMargin,$char['y']+$imageMargin,$foreground,$char['font'],$char['char']); } } else { // write text using a built-in font $x = 0; $y = 0; $imageWidth = 60 + drupal_strlen($string)*$charSpacingMax*.35; $imageHeight = 30 + $charJiggleAmount; // Create the image if (count($images) > 0 && function_exists(imagecolorallocatealpha)) { // We're going to be using an image, and need a tranparent background to start with $im = _textimage_create_transparent_image($imageWidth, $imageHeight); $noisecolor = imagecolorallocatealpha($im, 0, 0, 0, 127); } else { // Just make a plain-jane color brackground $im = imagecreatetruecolor($imageWidth, $imageHeight); $background = imagecolorallocate($im, rand(180, 250), rand(180, 250), rand(180, 250)); $noisecolor = $background; imagefill($im, 0, 0, $background); } // Add the text for ($i=0;$i 0) { // Prepare a larger image with a background image $im2 = _textimage_create_transparent_image($imageWidth, $imageHeight); } else { // Prepare a larger image with a solid color $im2 = imagecreatetruecolor($imageWidth, $imageHeight); imagefill($im2, 0, 0, $background); } $result = imagecopyresampled ($im2, $im, $imageMargin, $imageMargin, 0, 0, $imageWidth, $imageHeight, imagesx($im), imagesy($im)); $im = $im2; } // strikethrough imageline($im, rand(0, 120), rand(0, 120), rand(0, 120), rand(0, 120), $foreground); // Add Noise for ($x=0; $x<$imageWidth; $x++) { for ($row=0; $row<$imageNoise;$row++) { $y = rand(0,$imageHeight); imagesetpixel($im, $x, $y, $noisecolor); } } // Add Lines and Ellipses for ($x=0; $x<$imageLines;$x++) { imageline($im, rand(0, $imageWidth), rand(0, $imageHeight), rand(0, $imageWidth), rand(0, $imageHeight), $noisecolor); imageellipse($im, rand(0, $imageWidth), rand(0, $imageHeight), rand(0, $imageWidth), rand(0, $imageHeight), $noisecolor); } // Fill image with a random background image if available if (count($images) > 0) { $image = $images[rand(0,count($images)-1)]; _textimage_apply_background_image($im,$image); } //output to browser imagepng($im); imagedestroy($im); } /** * Returns a random string for use in a captcha */ function _textimage_code() { $consts='bcdgjxvmnprst'; $vowels='aeiou'; for ($x=0; $x < 6; $x++) { mt_srand ((double) microtime() * 1000000); $const[$x] = drupal_substr($consts,mt_rand(0,drupal_strlen($consts)-1),1); $vow[$x] = drupal_substr($vowels,mt_rand(0,drupal_strlen($vowels)-1),1); } $string = $const[0] . $vow[0] .$const[2] . $const[1] . $vow[1] . $const[3] . $vow[3] . $const[4]; $string = drupal_substr($string,0,rand(4,6)); //everytime we create a new code, we write it to session $_SESSION['captcha'] = drupal_strtolower($string); if(variable_get('textimage_use_only_upper',0)) $string = drupal_strtoupper($string); return $string; } /** * Returns an array of files with TTF extensions in the specified directory. */ function _textimage_font_list() { $fontdir = variable_get("textimage_fonts_path", ""); $filelist = array(); if (is_dir($fontdir) && $handle = opendir($fontdir)) { while ($file = readdir($handle)) { if (preg_match("/\.ttf$/i",$file) == 1) $filelist[] = $fontdir.'/'.$file; } closedir($handle); } return $filelist; } /** * Returns an array of files with jpg, png, and gif extensions in the specified directory. */ function _textimage_image_list() { $imagesdir = variable_get("textimage_images_path", ""); $filelist = array(); if (is_dir($imagesdir) && $handle = opendir($imagesdir)) { while ($file = readdir($handle)) { if (preg_match("/\.gif|\.png|\.jpg$/i",$file) == 1) $filelist[] = $imagesdir.'/'.$file; } closedir($handle); } return $filelist; } /** * Overlays an image to the supplied image resource */ function _textimage_apply_background_image (&$imageResource,$imageFile) { $backgroundResource = image_gd_open($imageFile,substr($imageFile,-3)); // Copy the text onto the background $backX = imagesx($backgroundResource); $backY = imagesy($backgroundResource); $textX = imagesx($imageResource); $textY = imagesy($imageResource); $randomBackX = rand(0,$backX-$textX); $randomBackY = rand(0,$backY-$textY); // Place the text onto a random location of the background image imagecopyresampled($backgroundResource,$imageResource,$randomBackX,$randomBackY,0,0,$textX,$textY,$textX,$textY); // Crop the background image to the original image size imagecopyresampled($imageResource,$backgroundResource,0,0,$randomBackX,$randomBackY,$textX,$textY,$textX,$textY); } /** * Creates transparent image resources for images with graphic backgrounds */ function _textimage_create_transparent_image($x, $y) { $i = imagecreatetruecolor($x, $y); $b = imagecreatefromstring(base64_decode(_text_image_blankpng())); imagealphablending($i, false); imagesavealpha($i, true); imagecopyresized($i, $b ,0 ,0 ,0 ,0 ,$x, $y, imagesx($b), imagesy($b)); return $i; } function _text_image_blankpng() { $c = "iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m"; $c .= "dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADqSURBVHjaYvz//z/DYAYAAcTEMMgBQAANegcCBNCg"; $c .= "dyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAAN"; $c .= "egcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQ"; $c .= "oHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAA"; $c .= "DXoHAgTQoHcgQAANegcCBNCgdyBAgAEAMpcDTTQWJVEAAAAASUVORK5CYII="; return $c; } ?> blogs | oellermann.com

blogs

  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/oellermann/includes/unicode.inc on line 291.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/oellermann/includes/unicode.inc on line 291.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/oellermann/includes/unicode.inc on line 291.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/oellermann/includes/unicode.inc on line 291.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/oellermann/includes/unicode.inc on line 291.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/oellermann/includes/unicode.inc on line 291.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/oellermann/includes/unicode.inc on line 291.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/oellermann/includes/unicode.inc on line 291.

KonicaMinolta 2490MF: Now Working on Linux!

| | |

To my great joy, I can now print direct to my 2490MF my using foo2lava, a free software driver for the printer developed by Rick Richardson independently of any assistance or support from KonicaMinolta. If you have one of these printers, be sure to use his driver - and send RIck a thank-you donation to encourage him to keep working on all our behalves!

To KonicaMinolta: my loathing deepens to disgust. KonicaMinolta support told me that they couldn't produce a Linux driver because it was "impossible" - and yet Rick, without even the benefit of engineering support from KonicaMinolta, has managed to do it. This means that KonicaMinolta is lying to customers like me who have asked for a Linux driver for the 2490MF. Come on, guys - you'll blow your business treating your customers like that! If you want to recapture any form of respect from me, write out a big cheque to Rick, and then ask him if you can distribute his driver with your printers.


The Joys of Scotland: Pheasant

|

It's been hunting season recently, and our neighbour, Mr Marshall, kindly brought us 3 freshly-shot pheasant! He'd been kind enough to pluck them and clean them for us, so they were basically ready for the pot. We roasted two of them last Saturday for lunch, serving them on a creamy red-wine-and-mushroom sauce. They were absolutely heavenly; it's also nice to know that they had a good life, totally free-range and left pretty much to their own devices. I like to think that they may even have eaten some of our grass - we see them on our place often enough, to Elijah's (our Stafforshire terrier) quivering delight. 


Most Popular Blog on the Web?

|

I've decided that this blog - yes, this weird grab-bag of technical bits, opinions and my life - is actually much more popular than it would seem. The only problem is that the popularity is limited to a strange demographic.

This odd demographic includes remortgage specialists, penny stock advisers, pornographers, purveyors of unmentionable pharmaceuticals and related people. Now, much as I hate to appear to be a snob, this keen interest from the blogosphere's nether world isn't really the audience I had in mind when I started this blog. Still, the comments and trackbacks roll in like an unending spring tide. Naturally enough,


KonicaMinolta 2490MF Multifunction Colour Laser

|

I recently acquired a KonicaMinolta MagiColor 2490MF, because it has impressive-looking specs and features, and the price looked right. I specifically went for the more expensive 2490MF because I wanted a network printer - most of my machines run Linux and I didn't want the heartache of dealing with a dodgy WinPrinter.

Guess what? It's a dodgy WinPrinter, which has network drivers. Aargh! While I can't fault the actual printer engine - the print quality is fast and excellent, the scan-to-email works as advertised, and generally everything seems superb - if you want to print from Linux, it's a paperweight. I've contacted KonicaMinolta support, and they've confirmed that they have no Linux driver and no plans to offer Linux support.


Building KDE Apps with KDevelop

| |

I've been using Linux for a long time now (Slackware on the server since late 1995, Debian on the server and as my primary desktop at home since 2001, and Ubuntu since 2003) but to my shame I have never written much in the way of serious software for the platform. True, my OCCCM content management and various other bits of PHP were targeted primarily at Linux on the server, but my desktop offerings (Chess, Draughts and Morabaraba) have somehow always ended up pitched at Windows. I think this is because I've written a lot of desktop code for Windows, but somehow never "got into" desktop stuff for Linux. So my recent Morabaraba releases have been for Linux - but command-line only. Since Morabaraba is a board game, it really wants a GUI. So, today - as a sort of Hogmanay celebration - I set up KDevelop and Qt3 Designer (just a bit of apt-get to us Ubuntu fiends, you understand) and followed a simple tutorial while watching the telly. Well, I'm quite cheered by the experience. The whole "slots and signals" thing in Qt3 is a bit odd, and it's perhaps not quite as tightly-integrated as the IDEs I'm used to, but there are no hidden mysteries, and I'm pretty sure that after a little bit it will all be old hat. 


Fixing Graphics Corruption Under Ubuntu on New Laptop

| | |

I count myself fortunate to have a shiny Acer TravelMate 8204WLMi laptop to play with. It's a lovely machine, but the ATI Mobility Radeon X1600 has proved a bit thorny, up until now. Firstly, I had to specify the "nosplash" option to grub to get the thing to boot up (and later change the boot option "splash" to "nosplash" in /boot/grub/menu.lst to avoid corruption of the command-line VTs), and then installed the fglrx drivers. That got me to the situation of things working nicely, but I had strange graphics corruption on a few applications - notably rdesktop and the Qt3 Designer. Thanks to the howto here , I've been able to resolve this last niggle. Have a look at the howto, but the essence of what I had to do was:


Morabaraba: I've Created a Monster

|

Well, I beefed up the eval (including what I think are reasonable notions about space and mobility) and made some search algorithm improvements (recapture extensions and move ordering), with the result that the soon-to-be-released AHEM v0.3 is now much stronger than anything that has gone before - so much so that a 3-ply search from v0.3 easily crushes a 5-ply search from v0.1. The most irritating behaviour now is that when the search engine sees multiple wins, it comes to the conclusion that any move is winning, and basically starts moving randomly. Sigh. I need to add a bit of code to encourage it to prefer the shortest win.


Morabaraba: New Engine Winning!

|

In spite of labouring under the disadvantage of a greatly inferior evaluation and search algorithm (including no attempt at move ordering), the new version 0.2 engine for AHEM (Adam's Happy Electronic Morabaraba) is now scoring victories against the old engine. This is attributable purely to gaining extra search depth from raw speed. As the search algorithm and eval are upgraded to the level of the v0.1 version, additional search depth gains should result. This is a tremendous vindication of the decision to go ahead and build the new move generation strategy using C. Although I was going to make further improvements to the eval and the search engine, this result fulfils my 0.2 release criterion ("better than 0.1"!). Accordingly, I'm going to take a bit of time off from engine development to package and publish the release. This means that the new movegen is complete, but the release will still have extremely naive eval (basically just material) and search (alphabeta with no effort at move ordering).


Ship It

|

Because I travel a lot, I often make up songs while I'm in the car. "Ship It" should really be sung by a breathy, fluffy blonde (think Marilyn Monroe and "Happy Birthday Mr President"), but yours truly was all that was available - so herewith the DIY version of "Ship It".

I also made a mistake with the encoder settings, accidentally producing the chipmunk version, which I think may be even better, so that's here too :-)

Merry Christmas!

 


Fixing Drupal after MySQL 4.0 -> 4.1

|

This weekend I setup SugarCRM on my server. Impressive stuff, but to get it going, I had to upgrade to MySQL 4.1. Unfortunately this broke Drupal - I got loads of warnings about "illegal mix of collations". My system is Debian stable, Drupal 4.7, and had MySQL 4.0 which upgraded to 4.1.

I found the answer here . The long and short of it is I had to do:

alter database drupal default CHARACTER SET utf8 COLLATE utf8_general_ci;
use drupal ;
ALTER TABLE access CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

for each Drupal database. I suppose the "ALTER TABLE" should probably be scripted for every Drupal table, but just the above seemed to do the trick.


Syndicate content