• Vladislav Vaintroub's avatar
    MDEV-26713 set console codepage to what user set in --default-character-set · 9ea83f7f
    Vladislav Vaintroub authored
    If someone on whatever reasons uses --default-character-set=cp850,
    this will avoid incorrect display, and inserting incorrect data.
    
    Adjusting console codepage sometimes also needs to happen with
    --default-charset=auto, on older Windows. This is because autodetection
    is not always exact. For example, console codepage on US editions of
    Windows is 437. Client autodetects it as cp850, a rather loose
    approximation, given 46 code point differences. We change the console
    codepage to cp850, so that there is no discrepancy.
    
    That fix is currently Windows-only, and serves people who used combination
    of chcp to achieve WYSIWYG effect (although, this would mostly likely used
    with utf8 in the past)
    
    Now, --default-character-set would be a replacement for that.
    
    Fix fs_character_set() detection of current codepage.
    9ea83f7f
mysqlimport.c 25.2 KB