Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.lang.javascript > #8383
| Path | csiph.com!aioe.org!PjvaPGOZsYouuofMcJQgBg.user.46.165.242.75.POSTED!not-for-mail |
|---|---|
| From | tets <tets@yahoo.invalid> |
| Newsgroups | it.comp.lang.javascript |
| Subject | Re: fromCodePoint alcune volte non funziona |
| Date | Fri, 4 Mar 2022 21:10:35 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <svtrns$koj$1@gioia.aioe.org> (permalink) |
| References | <svq5vt$1ivn$1@gioia.aioe.org> <fromCodePoint-20220304131204@ram.dialup.fu-berlin.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Info | gioia.aioe.org; logging-data="21267"; posting-host="PjvaPGOZsYouuofMcJQgBg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; |
| User-Agent | Mozilla/5.0 (X11; Linux i586; rv:93) Gecko/20100101 Firefox/98.0 |
| X-Notice | Filtered by postfilter v. 0.9.2 |
| Xref | csiph.com it.comp.lang.javascript:8383 |
Show key headers only | View raw
Stefan Ram wrote: > tets <tets@yahoo.invalid> writes: >> Perché la funzione "fromCodePoint" non stampa alcuni codici? > > Questa funzione non è mai stata pensata per stampare qualcosa. intendevo in senso lato output, per come lo intende anche la web console quando usa il comando print > >> 119965 > > |>typeof( String.fromCodePoint( 119965 )) > |<"string" > > |>String.fromCodePoint( 119965 ).length > |<2 > > Questo mostra che il valore «String.fromCodePoint( 119965 )» > ha due elementi. Possiamo ispezionarli. sono due elementi perché è un codice maggiore di 65535 e viene reso in due bytes. > > |>typeof( String.fromCodePoint( 119965 )[ 0 ]) > |<"string" > > |>String.fromCodePoint( 119965 )[ 0 ] > |<"\ud835" > > |>String.fromCodePoint( 119965 )[ 1 ] > |<"\udc9d" > > Se un tentativo di emettere (stampare) un punto di codice > fallisce, può essere perché non c'è nessun carattere associato > a questo punto di codice o perché il sistema di uscita > (la stampante) non può emettere correttamente quel carattere. > Non è convincente come risposta e la domanda rimane, perché non vedo il motivo per cui il carattere: - String.fromCodePoint( 119964 ) stampa la "A" - String.fromCodePoint( 119966 ) stampa la "C" mentre quello che sta in mezzo: - String.fromCodePoint( 119965 ) invece di stampare la "B" stampa solo il suo codice esadecimale 01d49d Insomma quel carattere "B" non si può stampare.
Back to it.comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar
fromCodePoint alcune volte non funziona tets <tets@yahoo.invalid> - 2022-03-03 11:40 +0100
Re: fromCodePoint alcune volte non funziona tets <tets@yahoo.invalid> - 2022-03-04 21:10 +0100
Re: fromCodePoint alcune volte non funziona tets <tets@yahoo.invalid> - 2022-03-05 22:54 +0100
csiph-web