Skip to content
  • Jeff Layton's avatar
    cifs: add new case-insensitive conversion routines that are based on wchar_t's · c2ccf53d
    Jeff Layton authored
    
    
    The existing NLS case conversion routines do not appropriately handle
    the (now common) case where the local host is using UTF8. This is
    because nls_utf8 has no support at all for converting a utf8 string
    between cases and the NLS infrastructure in general cannot handle
    a multibyte input character.
    
    In any case, what we really need for cifs is to emulate how we expect
    the server to convert the character to upper or lowercase. Thus, even
    if we had routines that could handle utf8 case conversion, we likely
    would end up with the wrong result if the name ends up being in the
    upper planes.
    
    This patch adds a new scheme for doing unicode case conversion. The
    case conversion tables that Microsoft has published for Windows 8
    have been converted to a set of lookup tables, and a routine is
    added to convert a wchar_t from lower to uppercase using those
    tables.
    
    Reported-and-Tested-by: default avatarJan-Marek Glogowski <glogow@fbihome.de>
    Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
    Signed-off-by: default avatarSteve French <smfrench@gmail.com>
    c2ccf53d