Getting error in ysld and css style in GeoServer

Description

I have a Sql Server Store in Geoserver. This is my ysld file(I test this scenario with CSS style but it is not working):

title: 'YSLD Cook Book: Attribute-based polygon'
feature-styles:

  • name: name
    rules:

  • name: empty
    title: empty
    filter: ${Rank = ''}
    symbolizers:

  • polygon:
    fill-color: '#66FF66'

  • name: title2
    title: title2
    filter: Rank LIKE N'خیلی زیاد'
    symbolizers:

  • polygon:
    fill-color: '#33CC33'

  • name: title3
    title: title3
    filter: ${Rank LIKE N'زیاد'}
    symbolizers:

  • polygon:
    fill-color: '#009900'

  • name: title4
    title: title4
    filter: ${Rank = N'متوسط'}
    symbolizers:

  • polygon:
    fill-color: '#009900'

I get this error: "Error parsing filter" because added "N" prefix to filter. I think that is a bug in GeoServer or SQL Server plugin. Sql Server require to this prefix for execute query on NVARCHAR columns that contains Persian characters but Geoserver can not handle that. When I test top ysld file with Geoserver Shapefile Store it is working fine because problem is with Sql Server.
See attach images:

Environment

operating system: windows 10
Sql Server Enterprise 2017
Sql Server Collation: Persian_100_CI_AI
geoserver 2.14.1
encoding: UTF-8
I changed java machine unicode to UTF-8(image attached):
Windows Environment Variables >> JAVA_TOOL_OPTIONS : -Dfile.encoding=UTF8

Status

Assignee

Unassigned

Reporter

Ali ch65

Triage

Fix versions

None

Affects versions

2.14.1

Priority

Highest