I have a block of code on the c++ end that would pass a string like this:

```
char someName[100]="Some String here";
    send(sock,someName,sizeof(someName),0);

```

and on the other end I have a java code looking for a string message like this:

```
DataInputStream dIn= new DataInputStream(SOCK.getInputStream());
String filename=dIn.readUTF(); //Looks for "Some String here"

```

the code does not continue and gives a UTFDataFormatException. So I'm basically looking for conversion on c++ someName to UTF-8 format so both ends will be happy!

Thanks!

**EDIT:** 
I tried using BufferedReader on the java code and got something like: 

> 
> ‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~‡áø~
> 
> 
>