Skip to content

utf-8 characters support? #317

Closed
Closed
@reverland

Description

@reverland

I try to use css-loader to load this file

body {
  font-family: '微软雅黑'; /* some chinese font name */
}

but get this

    exports.push([module.id, "@charset 'UTF-8';\nbody {\n  font-family: '\\5FAE\\8F6F\\96C5\\9ED1';\n}\n", ""]);

It looks like the font name is transformed into something else.

follow the way i found stringfyValues which will stringify the utf-8 character...

https://github.com/css-modules/css-selector-tokenizer/blob/master/lib/stringifyValues.js

what the declaration value is stringified for? Is there any way to use non ascii font name with css-loader?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions