Skip to content

Unicode matching #569

@PookMook

Description

@PookMook

hi

Do you want to request a feature or report a bug?
bug

I encounter a problem with how css-loader handle unicode in my CSS file
What is the current behavior?

When i feed the unicode for "é" : \0000E9, the compiled css ends up being mimified but transformed so

div#download:before{
  display:block;
  content:"T\E9l\0000E9charger";
}

becomes :
div#download:before{display:block;content:"T\E9l\E9 charger le fichier YAML";text-align:center}
with two spaces after the unicode declaration which will display in the final page as "télé charger" instead of "télécharger"

I tried variations of it to see if I was missing something:
content:"T\E9l\E9charger"; => content:"T\E9l\E9Charger" =>" tél(accentued greek omega)harger"
content:"T\E9l\E9 charger"; => content:"T\E9l\E9 charger" with three spaces=> "télé charger"
content:"T\E9l\E9\000063harger"; => content:"T\E9l\E9 charger"; with two spaces => "télé charger"
content:"T\E9l\0000E9\000063harger"; => content:"T\E9l\E9 charger"; with two spaces => "télé charger"

What is the expected behavior?
the expected behavior would be to transform
content:"T\E9l\0000E9charger";
in
content:"T\E9l\E9 charger";
with only one space (to escape the unicode recognition, but not 2 as it is now that add an extra space in the final HTML render.

Please mention other relevant information such as your webpack version, Node.js version and Operating System.
I use

    "webpack": {
      "version": "2.6.1",
"css-loader": {
      "version": "0.28.4",
"font-awesome-webpack": {
      "dependencies": {
        "css-loader": {
          "version": "0.26.4",

and my rule for match css is

                test: /\.css$/,
                use: extractPlugin.extract({
                    use: ['css-loader']
                })

thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions