View Issue Details

IDProjectCategoryView StatusLast Update
0035989FPCFCLpublic2019-08-24 14:34
ReporterSimon AmeisAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformDesktop PCOSWindows 7, 64 bitOS Version6.1 SP 1
Product VersionProduct Build42449 
Target VersionFixed in Version3.3.1 
Summary0035989: fcl-web: change TResponse.Content to RawByteString
DescriptionWhen passing a UTF-8 encoded string to TRespnse.Content, it get's converted to default codepage possibly loosing unicode characters.
After changing property and parameter types of Content, Getcontent and SetContent to RawByteString, the value is processed correctly.
Steps To Reproduce
  1. Create a HTTP application (in my case FastCGI)

  2. Add a TJSONRPCModule

  3. Add a TJSONRPCHandler

  4. Add an OnExecute event handler with
    Res := TJSONObject.Create(['n', 'ß']);

  5. Save file in UTF8 and run

Tagsfcl-web, unicode
Fixed in Revision42767
FPCOldBugId
FPCTarget3.2.0
Attached Files

Activities

Michael Van Canneyt

2019-08-23 09:27

administrator   ~0117791

Changed, thanks for reporting this.

Further changes may be needed: the content is copied to a TStringList.
This is time consuming, and potentially involves many codepage checks/changes as well.
I will do this in a separate issue.

Issue History

Date Modified Username Field Change
2019-08-20 22:34 Simon Ameis New Issue
2019-08-20 22:35 Simon Ameis Tag Attached: unicode
2019-08-20 22:35 Simon Ameis Tag Attached: fcl-web
2019-08-21 21:34 Michael Van Canneyt Assigned To => Michael Van Canneyt
2019-08-21 21:34 Michael Van Canneyt Status new => assigned
2019-08-23 09:27 Michael Van Canneyt Status assigned => resolved
2019-08-23 09:27 Michael Van Canneyt Resolution open => fixed
2019-08-23 09:27 Michael Van Canneyt Fixed in Version => 3.3.1
2019-08-23 09:27 Michael Van Canneyt Fixed in Revision => 42767
2019-08-23 09:27 Michael Van Canneyt FPCTarget => 3.2.0
2019-08-23 09:27 Michael Van Canneyt Note Added: 0117791
2019-08-24 14:34 Simon Ameis Status resolved => closed