New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't export query result with Shift-JIS encoding #13803

Closed
limitusus opened this Issue Nov 7, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@limitusus

limitusus commented Nov 7, 2017

I wanted to export query result into CSV file with Shift-JIS encoding but I couldn't.

I bisected and found that 14f738c broke the behaviour.

$GLOBALS['cfg']['AvailableCharsets'] includes SHIFT_JIS but mb_list_encodings() result does not include it, including SJIS-win and SJIS.
My colleague wants to open CVS file from Microsoft excel, so I want to hand him with SJIS-win encoded CSV.
I think $GLOBALS['cfg']['AvailableCharsets'] should include SJIS and SJIS-win instead of SHIFT_JIS.

Steps to reproduce

  1. Query with an arbitrary SQL (SELECT 1 is enough) and execute.
  2. Click "Export" and select "detailed export method".
  3. Try to save output into a file

Expected behaviour

SJIS-win should appear in exporting file encoding.

Actual behaviour

Only limited number of character sets appears, without SJIS-win.

Server configuration

Operating system:

Amazon Linux

Web server:

Apache 2.4.23

Database:

Amazon Aurora MySQL

PHP version:

PHP 5.6.30 (cli) (built: Mar  8 2017 00:17:28)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

phpMyAdmin version:

4.7.5

Client configuration

Browser:

Google Chrome

Operating system:

MacOS (Sierra)

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Nov 13, 2017

Member

You can configure $cfg['AvailableCharsets'] to match your needs, but indeed the default value should be adjusted.

Member

nijel commented Nov 13, 2017

You can configure $cfg['AvailableCharsets'] to match your needs, but indeed the default value should be adjusted.

@nijel nijel added the enhancement label Nov 13, 2017

@nijel nijel self-assigned this Nov 13, 2017

@nijel nijel added this to the 4.7.6 milestone Nov 13, 2017

@nijel nijel closed this in 9f34492 Nov 13, 2017

ibennetch added a commit that referenced this issue Dec 1, 2017

Add SJIS-win to default list of allowed charsets
Fixes #13803

Signed-off-by: Michal Čihař <michal@cihar.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment