nodejs/node · error
Quote is '%c' - not sure what to do.\n
Error message
Quote is '%c' - not sure what to do.\n
What it means
After consuming 'u' (and optional '8'), escapesrc expects the next character to be a single or double quote that delimits the string/char literal. If it is neither '\'' nor '"', the tool cannot tell where the literal begins and bails on the line.
Source
Thrown at deps/icu-small/source/tools/escapesrc/escapesrc.cpp:228
if(linestr[pos] != 'u') {
fprintf(stderr, "Not a 'u'?");
return true;
}
pos++; // past 'u'
bool utf8 = false;
if(linestr[pos] == '8') { // u8"
utf8 = true;
pos++;
}
char quote = linestr[pos];
if(quote != '\'' && quote != '\"') {
fprintf(stderr, "Quote is '%c' - not sure what to do.\n", quote);
return true;
}
if(quote == '\'' && utf8) {
fprintf(stderr, "Cannot do u8'...'\n");
return true;
}
pos ++;
//printf("u%c…%c\n", quote, quote);
for(; pos < linestr.size(); pos++) {
if(linestr[pos] == quote) {
if(utf8) {
return fixu8(linestr, origpos, pos); // fix u8"..."
} else {
return false; // end of quoteView on GitHub (pinned to 1b2de5e052)
Solutions
- Inspect the reported line and ensure any u/u8/U/L literal is written as a contiguous prefix+quote (e.g. u8"...", u'x') with no intervening characters.
- If the 'u' is part of an identifier, rename it or add a space so the scanner does not treat it as a prefix (the scan heuristic triggers on the bare letter).
- Avoid feeding source files to escapesrc that the scanner cannot classify; exclude such files from the escapesrc build step.
Example fix
// before u8data x; // 'u8' looks like a prefix to the scanner // after u8_data_t x; // rename so it is not mistaken for a u8 literal
Defensive patterns
Strategy: validation
Validate before calling
// reject a 'u' not followed by a quote early, before dispatching to fixAt
char nx = (pos+1 < linestr.size()) ? linestr[pos+1] : 0;
if (linestr[pos]=='u' && nx!='\'' && nx!='"' && nx!='8') { /* treat as identifier, not a literal */ } Prevention
- Avoid identifiers that start with `u`/`u8` in files fed to escapesrc, or insert a space after them.
- Run escapesrc on a smoke-test source in CI to catch scanner regressions.
When it happens
Trigger: Source text where a 'u' token is immediately followed by a non-quote character, such as an identifier starting with u (e.g. `unsigned`, `uint32_t`), `u8` used as part of a longer identifier, or whitespace/formatting that defeats the scanner's prefix detection.
Common situations: Variable/type names beginning with u that the line scanner misclassifies as a string prefix; macro expansions producing `u` adjacent to non-quote text; whitespace-sensitive C++ where the scanner expects no space between prefix and quote.
Related errors
- Not a 'u'?
- Cannot do u8'...'\n
- %s: usage: %s infile.cpp outfile.cpp
- Illegal code point U+%X\n
- Illegal utf-8 sequence at Column: %d\n
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/5280cf24d3c36c35.
Report an issue: GitHub.