Torna indietro   Hardware Upgrade Forum > Software > Programmazione

Wi-Fi 7 con il design di una vetta innevata: ecco il nuovo sistema mesh di Huawei
Wi-Fi 7 con il design di una vetta innevata: ecco il nuovo sistema mesh di Huawei
HUAWEI WiFi Mesh X3 Pro Suite è probabilmente il router mesh più fotogenico che si possa acquistare oggi in Italia, ma dietro il guscio in acrilico trasparente e le luci LED dinamiche c'è una macchina tecnica costruita attorno allo standard Wi-Fi 7, con velocità teoriche Dual-Band fino a 3,6 Gbps e una copertura fino a 120 m² una volta abbinato il router principale all'extender incluso nel kit
Core Ultra 7 270K Plus e Core Ultra 7 250K Plus: Intel cerca il riscatto ma ci riesce in parte
Core Ultra 7 270K Plus e Core Ultra 7 250K Plus: Intel cerca il riscatto ma ci riesce in parte
Abbiamo provato le nuove CPU Intel Core Ultra 7 270K Plus e Core Ultra 7 250K Plus: più core e ottimizzazioni al funzionamento interno migliorano le prestazioni, anche in virtù di prezzi annunciati interessanti. A questo si aggiungono nuove ottimizzazioni software. Purtroppo, a fronte di prestazioni di calcolo elevate, il quadro rimane incerto nel gaming, dove l'andamento rimane altalenante. Infine, rimane il problema della piattaforma a fine vita.
PC Specialist Lafité 14 AI AMD: assemblato come vuoi tu
PC Specialist Lafité 14 AI AMD: assemblato come vuoi tu
Il modello "build to order" di PCSpecialist permette di selezionare una struttura base per un sistema, personalizzandolo in base alle specifiche esigenze con una notevole flessibilità di scelta tra i componenti. Il modello Lafité 14 AI AMD è un classico notebook clamshell compatto e potente, capace di assicurare una elevata autonomia di funzionamento anche lontano dalla presa di corrente
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 20-04-2010, 15:16   #1
ndakota
Senior Member
 
L'Avatar di ndakota
 
Iscritto dal: Oct 2006
Città: milano
Messaggi: 1439
[Java] Convertire una stringa da un charset ad un altro

Salve ragazzi. Come da titolo avrei bisogno di convertire una stringa dal formato us-ascii ad uno ascii esteso qualsiasi. In parole povere la mia stringa non prende le accentate(è me lo ritrovo come qualcosa tipo E=09). E' possibile, passando ad un altro charset(per esempio iso-8859-1), aggiustare questa stringa? Grazie
ndakota è offline   Rispondi citando il messaggio o parte di esso
Old 20-04-2010, 18:12   #2
DanieleC88
Senior Member
 
L'Avatar di DanieleC88
 
Iscritto dal: Jun 2002
Città: Dublin
Messaggi: 5989
Puoi specificare un po' meglio dove e come ti si presenta il problema?
Non vorrei che la mia memoria mi ingannasse, ma mi sembrava che Java gestisse nativamente le stringhe in Unicode.
__________________

C'ho certi cazzi Mafa' che manco tu che sei pratica li hai visti mai!
DanieleC88 è offline   Rispondi citando il messaggio o parte di esso
Old 20-04-2010, 19:06   #3
banryu79
Senior Member
 
L'Avatar di banryu79
 
Iscritto dal: Oct 2007
Città: Padova
Messaggi: 4131
Quote:
Originariamente inviato da Estratto dai Javadoc di java.lang.String
...
A String represents a string in the UTF-16 format in which supplementary characters are represented by surrogate pairs (see the section Unicode Character Representations in the Character class for more information). Index values refer to char code units, so a supplementary character uses two positions in a String.
...
+
Quote:
Originariamente inviato da Estratto dai Javadoc di java.nio.charset.Charset
...
Every instance of the Java virtual machine has a default charset, which may or may not be one of the standard charsets. The default charset is determined during virtual-machine startup and typically depends upon the locale and charset being used by the underlying operating system.
...
Gli standard charset a cui si riferisce sarebbero questi:
Codice:
Standard charsets

Every implementation of the Java platform is required to support the following standard charsets. 
Consult the release documentation for your implementation to see if any other charsets are supported. 
The behavior of such optional charsets may differ between implementations.

    US-ASCII 	Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set
    ISO-8859-1   	ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
    UTF-8 	Eight-bit UCS Transformation Format
    UTF-16BE 	Sixteen-bit UCS Transformation Format, big-endian byte order
    UTF-16LE 	Sixteen-bit UCS Transformation Format, little-endian byte order
    UTF-16 	Sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark
Non ho capito la tua situazione comunque dovresti far presto a fare una prova: partendo dalla tua String e sfruttando il metodo getBytes(Charset) puoi ottenerne l'array di bytes codificati secondo il Charset che desideri, quindi passi questo array come argomento al costruttore di una nuova String e la stampi per vedere cosa sputa: metodo scientifico
__________________

As long as you are basically literate in programming, you should be able to express any logical relationship you understand.
If you don’t understand a logical relationship, you can use the attempt to program it as a means to learn about it.
(Chris Crawford)
banryu79 è offline   Rispondi citando il messaggio o parte di esso
Old 20-04-2010, 22:34   #4
ndakota
Senior Member
 
L'Avatar di ndakota
 
Iscritto dal: Oct 2006
Città: milano
Messaggi: 1439
Quote:
Originariamente inviato da DanieleC88 Guarda i messaggi
Puoi specificare un po' meglio dove e come ti si presenta il problema?
Non vorrei che la mia memoria mi ingannasse, ma mi sembrava che Java gestisse nativamente le stringhe in Unicode.
Praticamente ricevo il formato di una mail in plain text. E dagli attributi leggo che è in charset "us-ascii".

Quote:
Originariamente inviato da banryu79 Guarda i messaggi
+


Gli standard charset a cui si riferisce sarebbero questi:
Codice:
Standard charsets

Every implementation of the Java platform is required to support the following standard charsets. 
Consult the release documentation for your implementation to see if any other charsets are supported. 
The behavior of such optional charsets may differ between implementations.

    US-ASCII 	Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set
    ISO-8859-1   	ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
    UTF-8 	Eight-bit UCS Transformation Format
    UTF-16BE 	Sixteen-bit UCS Transformation Format, big-endian byte order
    UTF-16LE 	Sixteen-bit UCS Transformation Format, little-endian byte order
    UTF-16 	Sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark
Non ho capito la tua situazione comunque dovresti far presto a fare una prova: partendo dalla tua String e sfruttando il metodo getBytes(Charset) puoi ottenerne l'array di bytes codificati secondo il Charset che desideri, quindi passi questo array come argomento al costruttore di una nuova String e la stampi per vedere cosa sputa: metodo scientifico
Ho già provato, ma mi stampa sempre la stringa di partenza, anche se il charset cambia. Provato stampando i byte.
ndakota è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


Wi-Fi 7 con il design di una vetta innevata: ecco il nuovo sistema mesh di Huawei Wi-Fi 7 con il design di una vetta innevata: ecc...
Core Ultra 7 270K Plus e Core Ultra 7 250K Plus: Intel cerca il riscatto ma ci riesce in parte Core Ultra 7 270K Plus e Core Ultra 7 250K Plus:...
PC Specialist Lafité 14 AI AMD: assemblato come vuoi tu PC Specialist Lafité 14 AI AMD: assemblat...
Recensione Nothing Phone 4(a): sempre iconico ma ora più concreto Recensione Nothing Phone 4(a): sempre iconico ma...
Corsair Vanguard Air 99 Wireless: non si era mai vista una tastiera gaming così professionale Corsair Vanguard Air 99 Wireless: non si era mai...
La NASA dimostrerà l'utilizzo del...
L'ESA acquisterà una missione Cre...
La NASA cambia idea sulle stazioni spazi...
Implementazione NVMe nativa disattivata ...
Polestar 2 e 3: le batterie integrano or...
Crisi delle memorie: ecco le soluzioni p...
Il satellite ESA Proba-3 è tornat...
'Chiudete (quasi) tutto', il risultato d...
Tesla, maggiore autonomia grazie a una r...
Nasce TrendAI, la divisione di Trend Mic...
Recensione Motorola Signature: il primo ...
TeraFab, Elon Musk parte all'assalto di ...
L'ambiziosa base lunare permanente sulla...
Litografia BEUV (Beyond-EUV): la startup...
SAP e l'IA agentica: dall'hype alla matu...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 00:23.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Served by www3v