Bug 28321 (PC) - Encoding.GetString does not decode the text from Shift_JIS encoding correctly
Summary: Encoding.GetString does not decode the text from Shift_JIS encoding correctly
Status: NEW
Alias: PC
Product: Class Libraries
Classification: Mono
Component: General (show other bugs)
Version: 3.12.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-23 05:14 UTC by Prashant Cholachagudda
Modified: 2015-03-25 22:03 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Prashant Cholachagudda 2015-03-23 05:14:15 UTC
When we try to get the string from Shift_JIS encoded text we get incorrect value from GetString method

	var sjisEnc = Encoding.GetEncoding("Shift_JIS");
	byte[] sjisText1 =  Encoding.GetEncoding("Shift_JIS").GetBytes("×");
	string text1 = sjisEnc.GetString(sjisText1);

The text value returned as `?` instead of `x`

Note You need to log in before you can comment on or make changes to this bug.