Torna indietro   Hardware Upgrade Forum > Software > Programmazione

DJI RS 5: stabilizzazione e tracking intelligente per ogni videomaker
DJI RS 5: stabilizzazione e tracking intelligente per ogni videomaker
Analizziamo nel dettaglio DJI RS 5, l'ultimo arrivato della famiglia Ronin progettato per videomaker solisti e piccoli studi. Tra tracciamento intelligente migliorato e ricarica ultra rapida, scopriamo come questo gimbal eleva la qualità delle produzioni.
AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequenze al top per il gaming
AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequenze al top per il gaming
AMD Ryzen 7 9850X3D è la nuova CPU gaming di riferimento grazie alla 3D V-Cache di seconda generazione e frequenze fino a 5,6 GHz. Nei test offre prestazioni superiori a 9800X3D e 7800X3D, confermando la leadership AMD nel gaming su PC.
Le soluzioni FSP per il 2026: potenza e IA al centro
Le soluzioni FSP per il 2026: potenza e IA al centro
In occasione del Tech Tour 2025 della European Hardware Association abbiamo incontrato a Taiwan FSP, azienda impegnata nella produzione di alimentatori, chassis e soluzioni di raffreddamento tanto per clienti OEM come a proprio marchio. Potenze sempre più elevate negli alimentatori per far fronte alle necessità delle elaborazioni di intelligenza artificiale.
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


DJI RS 5: stabilizzazione e tracking intelligente per ogni videomaker DJI RS 5: stabilizzazione e tracking intelligent...
AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequenze al top per il gaming AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequen...
Le soluzioni FSP per il 2026: potenza e IA al centro Le soluzioni FSP per il 2026: potenza e IA al ce...
AWS annuncia European Sovereign Cloud, il cloud sovrano per convincere l'Europa AWS annuncia European Sovereign Cloud, il cloud ...
Redmi Note 15 Pro+ 5G: autonomia monstre e display luminoso, ma il prezzo è alto Redmi Note 15 Pro+ 5G: autonomia monstre e displ...
OpenAI ha bisogno di nuovi fondi: NVIDIA...
Mese nuovo, rinnovo delle offerte Amazon...
Accessori auto imperdibili su Amazon: pu...
Gli utenti iPhone possono ridurre la pr...
Come fare affari con l'usato garantito d...
Il miglior tablet di tutta Amazon, DOOGE...
Gli smartphone in super offerta su Amazo...
Produttori di memoria più severi ...
WhatsApp Business, Meta introduce costi ...
SpaceX vuole portare nello Spazio 1 mili...
Realme 16: il nuovo mid-range che si isp...
DAZN lancia il piano Full Mobile a 19,99...
Samsung Galaxy S26, ormai è tutto...
Smartphone sempre più cari: super...
L'ultima puntata di Falsissimo rimossa d...
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: 11:41.


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