Dave C Dave C - 2 months ago 20
CSS Question

react-select UTF encoding makes 'x' look like '×' multiselect

I am using the react-select, 1.0.0-beta14 component, installed via npm.

I have a selector in a stateless functional component:

<ControlLabel>Days Of Week</ControlLabel>
<Select
onChange={props.dayOfWeekOnChange}
name="dayOfWeekSelector"
value={props.dayOfWeek}
multi={true}
options={props.daysOfWeek.map(function (dayOfWeek, i) {
return { value: dayOfWeek, label: dayOfWeek }
}) }>
</Select>


When I make selections in it, the little 'x' shows up as '×'. I'm including the css file via require and processing it with "css-loader": "^0.23.1" via webpack.

This site led me to believe it might be an encoding problem, but I'm not sure where to look to fix this.

their example:

enter image description here

mine:

multiselect with weird characters

Answer

I had the same issue and solved it by adding <meta charset="UTF-8"> in the <head> tag of your main html file. – Moltes

This solved my problem.

Comments