UseNLS switch not working in Linux Docker Containers for Dot net Core 6 Application #89562
-
I notice difference in the CultureInfo when running in Windows and Docker Container. On digging through I found out NLS and ICU. Does using NLS in linux will guarantee same behaviour in both Windows and Linux? This is the piece of code that I found in the Documentation to check whether Application is using ICU I have put UseNLS as true in the csproj file. But the above code prints True for Docker container and False for Windows ` Exe net6.0 enable enable Linux . true `I am installing the required Locale in the Dockerfile `#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base #Installing en_US locale FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build FROM build AS publish FROM base AS final Even after doing all of this the I still can't get the same Culture behaviour in Linux Containers and Windows. I would like to get some insights since most documentation do talk about using NLS in windows or using ICU in windows but mostly nothing about other OSs |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
NLS can be only used on Windows. ICU has been the default for Windows on versions where it's available for some time already. |
Beta Was this translation helpful? Give feedback.
NLS can be only used on Windows. ICU has been the default for Windows on versions where it's available for some time already.