1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2008 - DIGITEO - Allan CORNET
//
// This file is distributed under the same license as the Scilab package.
// =============================================================================
// <-- JVM NOT MANDATORY -->
// <-- Non-regression test for bug 3228 -->
//
// <-- Bugzilla URL -->
// http://bugzilla.scilab.org/show_bug.cgi?id=3228
//
// <-- Short Description -->
// ascii('é') returns a incorrect value
// UTF-8 encoding
if ascii('à') <> [195 160] then bugmes();quit;end
if ascii('ç') <> [195 167] then bugmes();quit;end
if ascii('è') <> [195 168] then bugmes();quit;end
if ascii('é') <> [195 169] then bugmes();quit;end
if ascii('ù') <> [195 185] then bugmes();quit;end
if ascii([195 160]) <> 'à' then bugmes();quit;end
if ascii([195 167]) <> 'ç' then bugmes();quit;end
if ascii([195 168]) <> 'è' then bugmes();quit;end
if ascii([195 169]) <> 'é' then bugmes();quit;end
if ascii([195 185]) <> 'ù' then bugmes();quit;end
if msprintf("%s", ascii(224)) <> ascii(224) then bugmes();quit;end
if msprintf("%s", ascii([195 160])) <> ascii([195 160]) then bugmes();quit;end
if msprintf("%s", ascii(231)) <> ascii(231) then bugmes();quit;end
if msprintf("%s", ascii([195 167])) <> ascii([195 167]) then bugmes();quit;end
if msprintf("%s", ascii(232)) <> ascii(232) then bugmes();quit;end
if msprintf("%s", ascii([195 168])) <> ascii([195 168]) then bugmes();quit;end
if msprintf("%s", ascii(233)) <> ascii(233) then bugmes();quit;end
if msprintf("%s", ascii([195 169])) <> ascii([195 169]) then bugmes();quit;end
if msprintf("%s", ascii(249)) <> ascii(249) then bugmes();quit;end
if msprintf("%s", ascii([195 185])) <> ascii([195 185]) then bugmes();quit;end
|