Bug #71897 Status of charset2html

Submitted: 1 Mar 2014 15:48 Modified: 11 Mar 2014 20:48
Reporter: Daniël van Eeden Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.6.16 OS:Any
Assigned to: CPU Architecture:Any

[1 Mar 2014 15:48] Daniël van Eeden
Description:
To get the charset2html utility compiled I had to add this to extra/CMakeLists.txt:

MYSQL_ADD_EXECUTABLE(charset2html charset2html.c)
TARGET_LINK_LIBRARIES(charset2html  mysys mysys_ssl)
SET_TARGET_PROPERTIES(charset2html PROPERTIES LINKER_LANGUAGE CXX)

It works for latin1_swedish_ci: 
$ charset2html latin1_swedish_ci | head
<HTML>
<HEAD>
</HEAD>
<BODY><PRE>
Charset latin1_swedish_ci
<TABLE>
<TR><TH>Code<TH>Uni<TH>Sort<TH>Ctype<TH>Ch<TH>Lo<TH>Up</TR><TR bgcolor=#EEEE99><TD>00<TD>0000<TD>00<TD>C<TD>&#0;<TD>&#0;<TD>&#0;</TR>
<TR bgcolor=#DDDDDD><TD>01<TD>0001<TD>01<TD>C<TD>&#1;<TD>&#1;<TD>&#1;</TR>
<TR bgcolor=#EEEE99><TD>02<TD>0002<TD>02<TD>C<TD>&#2;<TD>&#2;<TD>&#2;</TR>
<TR bgcolor=#DDDDDD><TD>03<TD>0003<TD>03<TD>C<TD>&#3;<TD>&#3;<TD>&#3;</TR>

But it fails on all unicode charsets I tried:
$ charset2html utf8_general_ci 
<HTML>
<HEAD>
</HEAD>
<BODY><PRE>
Charset utf8_general_ci
<TABLE>
Segmentation fault (core dumped)

This utility is mentioned here:
https://dev.mysql.com/doc/internals/en/extra-directory.html
https://dev.mysql.com/doc/internals/en/charsets.html

The description "checks your browser's character set" does not seem to be true, it seems to be a utility to view charsets and it also doubles as an example for how to use charset functions. 

I would expect it to be mentioned here, but it isn't:
http://dev.mysql.com/doc/refman/5.6/en/programs.html

How to repeat:
See description.

Suggested fix:
Make sure
- it is build
- it works
- it is properly documented.

Or remove it completely.
[5 Mar 2014 12:20] MySQL Verification Team
Hello Daniel,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[11 Mar 2014 20:48] Paul DuBois
Noted in 5.6.18, 5.7.5 changelogs.

The obsolete and unmaintained charset2html utility has been removed
from MySQL distributions.
[2 Jun 2014 13:42] Laurynas Biveinis
$ bzr log -r 5858
------------------------------------------------------------
revno: 5858
committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
branch nick: mysql-5.6-bug18352347
timestamp: Tue 2014-03-11 14:33:55 +0100
message:
  Bug#18352347: STATUS OF CHARSET2HTML
  
  This patch removes the charset2html utility.
  It was not maintained, not built, not bundled and not complete.
  It was not documented outside of the internals documentation.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.