Edoeard Kroetkov · Jan 23

view diacritics in REST service

I have code hier and trying to view diacrit character

Class Test.REST.Services Extends EnsLib.REST.Service

Parameter ADAPTER = "EnsLib.HTTP.InboundAdapter";

Parameter EnsServicePrefix = "^TEST";

XData UrlMap
<Route Url="/dio/:Resource" Method="GET"     Call="getDio" />

Method getDio(pInput As %Library.AbstractStream, Output pOutput As %Stream.Object, pResource As %String) As %Status
        set status = $$$OK
        do pOutput.SetAttribute("ResponseCode","200")
        set messageBuffer = "{""text"":""Patiënt""}"
        do pOutput.Write(messageBuffer)
        do pOutput.SetAttribute("Charset","UTF-8")
        set status = ##class(%SYSTEM.Status).OK()
         Quit $$$OK


But as response i get different character


any help will be appreciated

Hierwith my settings i use and trying

Product version: IRIS 2020.1
$ZV: 2020.1.0 build 217 path1
0 84
Discussion (1)1
Log in or sign up to continue

Hi Edoeard,

Try adding parameter CHARSET:

/// Main TDF REST service entry point
Class TDF.Main Extends %CSP.REST

Parameter CHARSET = "UTF-8";