My css has the following error code.
CSS Error parsing file:/C:/Users/dsm/Desktop/efxclipse/workspace/style/css/a.css: Expected LBRACE at [1,9]
I searched the Internet for an answer, and it says, at line 1, col 9 I am missing left brace { . However, if you look at my code line 1. I don't know where to put {. Can anyone have any advice?
#CHARSET "UTF-8"; //this is my code line 1
JavaFX cannot parse this line and will throw an exception.
You should only use #charset if style sheet and the HTML-file, that is calling the style sheet, have different encodings.
If a parser has problems with this line, it should be save to omit it - as long as your files are encoded correctly in UTF-8.
Related
This is a strange question. I request link type from server which might return "[TCP]" or "[UDP]". And I wanna use the string as classname directly for different background color like. What I want is :
<div className={`${styles.span} ${styles["[TCP]"]}`}/>
But the css selector ".[TCP]" is not allowed, below error given:
SassError: Invalid CSS after "&": expected selector, was ".[TCP]"
Now I am using .replace(/\[|\]/g,"") split the string "[TCP]" --> "TCP". But I hope someone can tell me another way or it's impossible.
"You can use [TCP] as classname."
As written here (demo) you can use any character for classname except NULL. All you have to do is in CSS write \ before special characters. In your case, it would look like this .\[TCP\].
But I believe it's much easier to just remove the special characters.
After finally getting my XmlReader to work correctly on a project at work, I am now getting certain parsing errors when trying to create new Reader objects for certain XML files. For instance, this one that keeps occurring is an error trying to parse a hyphen (-). This slightly baffles me because I manually go in and replace that character with something else (like an underscore), and it reads fine - even when there are hyphens elsewhere in the document that are not changed.
So, unless there is a explanation to fix this (maybe some XmlReaderSettings? Have yet to use any so I don't know what they are capable of), what is the best syntax/method to cycle through every character and replace with ones that will parse correctly?
This program will run automatically once per day on a daily-added XML and length of run-time is not an issue.
Edit: Error Message:
System.Xml.XmlException: An error occurred while parsing EntityName. Line 2896, position 89.
Code:
FN = Path.GetFileName(file1).ToString()
xmlFile = XmlReader.Create(Path.Combine(My.Settings.Local_Meter_Path, FN), New XmlReaderSettings())
ds.ReadXml(xmlFile)
Dim dt As DataTable = ds.Tables(13)
Dim filecreatedate As String = IO.File.GetLastWriteTime(file1)
If the problem occurs in ONLY ONE HYPHEN in entire file, even if the file contains more hyphens, the problem may be related to:
1) The HYPHEN is really not an HYPHEN but a control-character or even be accomplished of a hidden control character.
2) The link has other interesting thinhs, like an ampersand ("&"), which in strings may cause some problems. Are you sure the problem is the Hyphen?
I made a codepen demo illustrating the problem: codepen.io/acusti/pen/mJmVRy
And here’s the error I get if I try to load the svg content in Firefox:
XML Parsing Error: unclosed token
Location: data:image/svg+xml;utf8,<svg%20viewBox='0%200%20120%20120'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'><circle%20cx='45'%20cy='45'%20r='30'%20fill='#555555'></circle></svg>
Line Number 1, Column 77:
<svg viewBox='0 0 120 120' version='1.1' xmlns='http://www.w3.org/2000/svg'><circle cx='45' cy='45' r='30' fill='
----------------------------------------------------------------------------^
Note: I get that error by clicking on the data URI string in the Firefox developer tools (inside the CSS Rules panel while inspecting the .separator element), where a tooltip says “Could not load the image”. You can do the same thing by just copy-pasting the Location string from the error message above into your Firefox address bar.
It is not valid for data URIs to contain # characters like yours has, you must escape them as %23
The unescaped # character is reserved to indicate the start of a fragment identifier. Firefox is quite right to indicate a parsing error.
you can use the online tool https://www.zhangxinxu.com/sp/svgo/
it support let special characters encoded, such as:
"" => %22
# => %23
% => %25
...
I'm trying to get the degrees celsius symbol to show up using the pseudo selector :after but can't seem to any unicode to work. Using the symbol I have in place now prints a capital A before the degree symbol.
.temp:after{
content:"°C";
}
I’m pretty sure it actually prints “°”, i.e. capital A with circumflex before the degree sign. The reason is that the file containing the CSS code is UTF-8 encoded but being interpreted as windows-1252 encoded. (The degree sign, U+00B0, is 0xC2 0xB0 in UTF-8 encoding; if this is interpreted as windows-1252, or as ISO-8859-1, you get U+00C2 U+00B0, that is °.)
The solution is to declare the encoding of the file as UTF-8. The details depend on whether the CSS code is inside an HTML document or in a CSS file, and it may also depend on the server software. See the W3C page Character encodings.
If the code is in an CSS file, the simplest fix is to save that file, in your editor, as UTF-8 with BOM. Depending on software, this might be simply flagged as “UTF-8” (as opposite to “UTF-8 without BOM”). Another way is to write the following at the very start of the CSS file:
#charset "UTF-8";
this: content:'\00b0 C'; seems to work for me ? http://codepen.io/anon/pen/kvyFh
this could be helpfull to you : http://unicode-table.com/en/#00B0 (it gives you html entities code too ° )
I wanted to validate my Website for example with http://validator.w3.org but I always get the following error:
Sorry, I am unable to validate this document because on line 11 it
contained one or more bytes that I cannot interpret as utf-8 (in other
words, the bytes found are not valid values in the specified Character
Encoding). Please check both the content of the file and the character
encoding indication. The error was: utf8 "\xFC" does not map to
Unicode
Does anybody know where I can locate/get rid of the error?
open the css-file with your favorite text editor.
There, switch the encoding to UTF8.
Goto line 11 and look for strange looking symbols.
Delete/replace them.