Angular-cli: two blanks are added in css strings after special chars like german umlauts

Created on 1 Mar 2017  路  4Comments  路  Source: angular/angular-cli

OS?

Windows 10

Versions.

1.0.0-rc.0

Repro steps.

ng new test
ng serve (showing "app works")
then add h1:before { content: "zur眉ck--"; } in app.component.css
browser now shows "zur眉 ck--app works"

reason for this: the css is compiled to:
exports.push([module.i, "h1:before { content: \"zur\\FC ck\"; }\r\n", ""]);
(two additional spaces after \FC)

this happens only, when a hex-code [0-9a-fA-F] follow after the special character.

Mention any other details that might be useful.

css file must be utf (utf-8 in my case)

2 (required) bufix

Most helpful comment

I have exactly the same problem.

All 4 comments

Sounds like a bug. Thank you for reporting.

I have exactly the same problem.

@dschemmel @aduarteraposo Tried to replicate the issue seems like it works exactly the same on a blank webpack project too and is a CSS issue, not the CLI. To fix the issue you can do below things.

  • use html code for
  • you can set Content-Type: text/css; charset=utf-8 for css files.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings