** Package changed: magyarispell (Ubuntu) => enchant (Ubuntu)

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to enchant in Ubuntu.
https://bugs.launchpad.net/bugs/354609

Title:
  The spell checker in KDE4 can't find the hu_HU_u8 MySpell dictionary

Status in “enchant” package in Ubuntu:
  New

Bug description:
  Binary package hint: myspell-hu

  There is a bug in the Enchant spell checker library which prevents the
  spell checker module in KDE 4.x from finding the requested "hu_HU_u8"
  dictionary. Enchant incorrectly converts the dictionary tag to
  uppercase  starting from the first underscore, so the MySpell/Hunspell
  submodule in Enchant is actually trying to find "hu_HU_U8".

  A quick fix would be adding two symbolic links to the myspell-hu
  package (it works for me):

  "hu_HU_U8.aff" should link to "hu_HU_u8.aff" and
  "hu_HU_U8.dic" should link to "hu_HU_u8.dic".

  The real solution would be fixing it in Enchant itself as it may cause 
trouble for other dictionaries too.
  The bug is in src/enchant.c within the Enchant package, near the end of the 
enchant_normalize_dictionary_tag function. 

  > /* everything before first '_' is converted to lower case */
  >     if ((needle = strchr (new_tag, '_')) != NULL) {
  >                     enchant_ascii_strdown(new_tag, needle - new_tag);
  >                     ++needle;
  >                     /* everything after first '_' is converted to upper 
case */
  >                     enchant_ascii_strup(needle, -1);                        
   <---- This is not correct
  >             }
  >     else {
  >                     enchant_ascii_strdown(new_tag, -1);
  >             }

  If there is a second underscore in the string, only the substring
  between the first and second underscore should be converted to upper
  case.  So the fix would look like this (I DIDN'T test it):

  char* needle2;

  if ((needle2 = strchr(needle, '_')) != NULL)
    enchant_ascii_strup(needle, needle2 - needle);
  else
    enchant_ascii_strup(needle, -1);

  
  I was using the Kubuntu 9.04 beta.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/enchant/+bug/354609/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to