Menu

#10 csutil.cxx reverseword_utf without calling table routines

open
nobody
None
5
2008-06-29
2008-06-29
No

Looking at reverseword_utf routine, it calls 2 other routines to 1st store values in a table, then retrieve values after reversing.

Recoded routine to use a temporary utf character buffer so now it should work with 4char utf values correctly.

grep shows several locations where reverse is called, but I have not managed to find a way to quickly/easily test all possible combinations to verify this routine works.... unfortunately, do not know enough about hunspell to test this further.
In summary, routine compiles okay, but routine needs testing!

Discussion

  • Jose Da Silva

    Jose Da Silva - 2008-06-29

    Logged In: YES
    user_id=1138138
    Originator: YES

    Removed 2 lines from previous diff patch:

    1) removed "if (uc) return 1;" before memcpy

    ...because wc==wl should load c='\0' and therefore branch into "if ((c & 0x80) || uc) { //insert UTF8 buffered character" if last char is UTF8

    2) removed "if (c & 0x80) return 1;"

    ...because always should branch into ""if ((c & 0x80) || uc) { //insert UTF8 buffered character"

    File Added: csutil.cxx.diff

     
  • Jose Da Silva

    Jose Da Silva - 2008-06-29

    less processing