<p>Three likely culprit:</p>

<ul>
<li><strong>The file is compressed but your machine can't detect it</strong>.  So for example the 3MF model has been zipped, and what you are trying to do is opening the zip archive in the text editor, rather than the file that is in the zip archive.  Solution: try to see if common decompress utilities like zip, gzip, 7z can open the file.</li>
<li><strong>The file is a 3MF model but the <a href="https://en.wikipedia.org/wiki/Character_encoding" rel="nofollow noreferrer">character encoding</a> in the file being different than the one your editor is expecting</strong> (typically <code>Unicode/UTF-8</code>, these days).  Solution: read on the rest of this answer.</li>
<li><strong>The file is a binary one that is totally unrelated to 3MF</strong>.  So in essence: an error, you are trying to open maybe an MP3 or a JPG file believing it to be a 3MF instead.</li>
</ul>

<p>As for the "wrong encoding" option...  Oversimplifying a bit, the story goes like this:</p>

<ul>
<li>computers write data to files in bytes,</li>
<li>a byte can only be set to one of its 256 possible values,</li>
<li>in the early days of computing, when computers were just glorified calculators, it was enough to have a 1:1 ratio between the byte possible values and the symbols one wanted to use, so <a href="http://www.asciitable.com/" rel="nofollow noreferrer">ASCII</a> was born (actually ASCII only "mapped" the first 127 values of the byte, but that is a detail).  So: value #49 would represent a <code>1</code>, value #90 a <code>Z</code> and so on...</li>
<li>shortly afterwards, computers became powerful enough that people wanted to use them to process human languages, so the need for more characters (like accented ones <code>åáä</code> or the ones from non-latin alphabets like Cyrillic <code>язы́к</code> or arabic <code>عَرَبِيّ‎</code>, or...) came to be and engineers speaking different languages had the "brilliant" idea to each use the other 127 "free slots" in a byte for their favourite languages, thus a plethora of <a href="https://en.wikipedia.org/wiki/Extended_ASCII" rel="nofollow noreferrer">extended ASCII</a> encodings was born, <strong>each using the same byte value, but each mapping to a different symbol</strong>.</li>
<li>later on, people began to realise the need to combine the use of say Gaelic, English, Japanese and Farsi with mathematical symbols, and thus they came up to way to map symbols to values expressed as the product of more bytes (so for example: 2 bytes encoding could map 256x256=65536 symbols).  Again: each system using the same values but different symbols.</li>
<li>finally after decades of frustrated users and expensive bugs, engineers around the world settled for a multi-byte <strong>standard that has 1,114,112 possible values that could contain all characters one can possibly need</strong>, and <a href="https://en.wikipedia.org/wiki/Unicode" rel="nofollow noreferrer">Unicode</a> was born.</li>
</ul>

<p>Back to your question: despite unicode having been around for a few decades now, legacy software and sloppy programming are a thing, and there are still systems that do not use unicode internally but some legacy "special purpose" encoding.</p>

<p>Unfortunately, it is <a href="https://softwareengineering.stackexchange.com/a/187174/29074">impossible to say with certainty how a file was encoded</a>, so <strong>occasionally you may find yourself opening a file and starting decoding it according to a "conversion table" that is not the one used by the author of the file itself</strong>.  This is what it looks like is happening to you.</p>

<p>Onward to what you can try to do to fix this...</p>

<p>First of all: as attentive readers may have already inferred, <strong>you will need the actual file</strong> for this.  In fact if you cut-and-paste its "content" from an editor what you are really doing is cutting-and-pasting the <em>decoding</em> your computer did of the byte values, and not the byte values themselves.</p>

<p>Then your best bets are:</p>

<ul>
<li><strong>Try one of the online detectors</strong> like <a href="https://nlp.fi.muni.cz/projects/chared/" rel="nofollow noreferrer">this one</a>, using "English" as a language.  These detectors work by trying all the decoders they know of until the decoded file will have English (or another language of your choice) words in it.  This may not work for you as a 3MF file is mostly numbers, not text, but it is worth a shot.</li>
<li><strong>Guesstimate what encoder may have been used</strong>.  For example: if you got the file from an old windowsXP machine from Eastern Europe, chances are it may have been encoded with "windows-1251".  Use an <a href="http://www.motobit.com/util/charset-codepage-conversion.asp" rel="nofollow noreferrer">online converter</a> to see if you were right about it.</li>
<li><strong>Use brute force</strong>.  For this you will require to write a simple programme or ask somebody to do it for you, but the key idea here is to have a script taking your original file and decoding it using all encoders in that programming language knows of.  Then it will be up to you to open each decoded file individually and verify if it worked or not.</li>
</ul>

CC BY-SA 3.0
2018-01-18T06:35:21.960Z
Preventive comment: I am intimately familiar with the difference between UCS and UTF.  I chose to conflate the two for keeping the answer (that focuses on the rationale behind the existence of several encodings) more to the point. :)
mac
CC BY-SA 3.0
2018-01-19T20:27:11.707Z
I less words, he has the wrong file editor or viewer.
Fernando Baltazar
CC BY-SA 3.0
2018-01-19T20:43:10.587Z
@FernandoBaltazar - nope, 3MF is a textual, XML-based format. Any text editor is capable of displaying it correctly. The problem is either the unexpected encoding or the file being corrupted/not being a 3MF one.
mac
CC BY-SA 3.0
2018-01-19T21:14:29.570Z
This happens if you are using a wrong file editor or viewer, even if the file might be corrupted. All windows files has internally this ascii code.
Fernando Baltazar
CC BY-SA 3.0
2018-01-19T21:37:24.087Z
@FernandoBaltazar - I suspect you are using the wrong terms to express yourself.  Windows never used ASCII as a character set.  As far as I know the first version of Windows already had CP 1252, while DOS used CP 437.  I am not a Windows expert, but I believe Windows switched to Unicode/UTF-16 with the XP edition.
mac
CC BY-SA 3.0
2018-01-20T01:11:16.477Z
try to see a file inside with the wrong file editor, then make a comment; I personally modified some programs on 1990 and still I do with some files. Is nice to see the ascii and hex, while externally CPXX and UTF-xx are to see text and wyswyg, of course on DOS computers was an oddisey to get it. 

If Tom Unger can't read the file with the right file editor or viewer then the file is corrupted, just like this with less words.
Fernando Baltazar
CC BY-SA 4.0
2018-07-25T19:38:22.240Z
"The file is compressed"; this is true. In Ubuntu, the default app to open it is Archive Manager. For example, as I opened a .3mf file as a compressed one, there were three directories and a file in it.
MAChitgarha
CC BY-SA 3.0
2018-01-18T03:18:54.943Z
2018-01-18T06:53:07.613Z
2018-01-18T06:53:07.613Z
mac
<p>Seems to be your are trying to edit a file with the wrong file editor.</p>

<p>If you have Microsoft® Windows® 8.1, you can print directly using the 3MF format included. Simply set the print options in the 3D Print PropertyManager and print to the 3D printer. A preview of the print bed and the model's location within the print bed lets you modify settings before committing to a 3D print job.</p>

<p>To access the 3D print dialog box and specify print options, click File > 3DPrint.  The print dialog box that is available depends on your installed 3D print driver.</p>

<p>If you need to get the STL you may need to use a file conversion, <a href="https://www.youtube.com/watch?v=6MVeFiCN7bA" rel="nofollow noreferrer">here</a> is a youtube tutorial to makeprintable</p>

CC BY-SA 3.0
2018-01-17T17:59:59.110Z
2018-01-17T17:59:59.110Z
Fernando Baltazar
<p>So I am trying to get the XSD-Schema from this object. When I open the File I just get something like this code (snippet):</p>

<pre><code>¸†2¡Q·2ºyƒeCã2ï…w ïÀ|¼ðAøä[0Ÿ |&gt;‚|ó‘å2²ºFƒ¼Æò1ùàåcj@Þ`ùÐ¸Ì{áÈ;0/|¾ 
 ùÌ'Ÿ„ Á|d½¬¬¯Õ ¯±|l¾…­Œo@Þ`ùÐ¸Ì{áÈ;0/|¾ùÌ'Ÿ„ Á|d½œ¬¯Ó ¯±|h\æ­Œo@Þ`ù¸|
 ßBs¦5–Œ~ôè»­£(™c´“Ç£[yp1:æ'Ã‰c4Jó Uâ˜ÍÇ&lt;h—8^'Ð¯É
</code></pre>

<p>What is this? How can I convert it back? I need to edit the structure manually.
<br>Thank you in advance.</p>

<3d-models>
How can I read this 3mf-File
Tom Unger
# How can I read this 3mf-File

(Asked by: username_0 on 2018-01-17)

So I am trying to get the XSD-Schema from this object. When I open the File I just get something like this code (snippet):
¸†2¡Q·2ºyƒeCã2ï…w ïÀ|¼ðAøä[0Ÿ |>‚|ó‘å2²ºFƒ¼Æò1ùàåcj@Þ`ùÐ¸Ì{áÈ;0/|¾ 
 ùÌ'Ÿ„ Á|d½¬¬¯Õ ¯±|l¾…­Œo@Þ`ùÐ¸Ì{áÈ;0/|¾ùÌ'Ÿ„ Á|d½œ¬¯Ó ¯±|h\æ­Œo@Þ`ù¸|
 ßBs¦5–Œ~ôè»­£(™c´“Ç£[yp1:æ'Ã‰c4Jó Uâ˜ÍÇ
What is this? How can I convert it back? I need to edit the structure manually.
Thank you in advance.

**Tags:** 3d-models

---

## 2 answers

### Answer by username_1 on 2018-01-18. Score: 1 | Accepted answer

Three likely culprit:

* **The file is compressed but your machine can't detect it**. So for example the 3MF model has been zipped, and what you are trying to do is opening the zip archive in the text editor, rather than the file that is in the zip archive. Solution: try to see if common decompress utilities like zip, gzip, 7z can open the file.
* **The file is a 3MF model but the [character encoding](https://en.wikipedia.org/wiki/Character_encoding) in the file being different than the one your editor is expecting** (typically `Unicode/UTF-8`, these days). Solution: read on the rest of this answer.
* **The file is a binary one that is totally unrelated to 3MF**. So in essence: an error, you are trying to open maybe an MP3 or a JPG file believing it to be a 3MF instead.

As for the "wrong encoding" option... Oversimplifying a bit, the story goes like this:

* computers write data to files in bytes,
* a byte can only be set to one of its 256 possible values,
* in the early days of computing, when computers were just glorified calculators, it was enough to have a 1:1 ratio between the byte possible values and the symbols one wanted to use, so [ASCII](http://www.asciitable.com/) was born (actually ASCII only "mapped" the first 127 values of the byte, but that is a detail). So: value #49 would represent a `1`, value #90 a `Z` and so on...
* shortly afterwards, computers became powerful enough that people wanted to use them to process human languages, so the need for more characters (like accented ones `åáä` or the ones from non-latin alphabets like Cyrillic `язы́к` or arabic `عَرَبِيّ‎`, or...) came to be and engineers speaking different languages had the "brilliant" idea to each use the other 127 "free slots" in a byte for their favourite languages, thus a plethora of [extended ASCII](https://en.wikipedia.org/wiki/Extended_ASCII) encodings was born, **each using the same byte value, but each mapping to a different symbol**.
* later on, people began to realise the need to combine the use of say Gaelic, English, Japanese and Farsi with mathematical symbols, and thus they came up to way to map symbols to values expressed as the product of more bytes (so for example: 2 bytes encoding could map 256x256=65536 symbols). Again: each system using the same values but different symbols.
* finally after decades of frustrated users and expensive bugs, engineers around the world settled for a multi-byte **standard that has 1,114,112 possible values that could contain all characters one can possibly need**, and [Unicode](https://en.wikipedia.org/wiki/Unicode) was born.

Back to your question: despite unicode having been around for a few decades now, legacy software and sloppy programming are a thing, and there are still systems that do not use unicode internally but some legacy "special purpose" encoding.

Unfortunately, it is [impossible to say with certainty how a file was encoded](https://softwareengineering.stackexchange.com/a/187174/29074), so **occasionally you may find yourself opening a file and starting decoding it according to a "conversion table" that is not the one used by the author of the file itself**. This is what it looks like is happening to you.

Onward to what you can try to do to fix this...

First of all: as attentive readers may have already inferred, **you will need the actual file** for this. In fact if you cut-and-paste its "content" from an editor what you are really doing is cutting-and-pasting the *decoding* your computer did of the byte values, and not the byte values themselves.

Then your best bets are:

* **Try one of the online detectors** like [this one](https://nlp.fi.muni.cz/projects/chared/), using "English" as a language. These detectors work by trying all the decoders they know of until the decoded file will have English (or another language of your choice) words in it. This may not work for you as a 3MF file is mostly numbers, not text, but it is worth a shot.
* **Guesstimate what encoder may have been used**. For example: if you got the file from an old windowsXP machine from Eastern Europe, chances are it may have been encoded with "windows-1251". Use an [online converter](http://www.motobit.com/util/charset-codepage-conversion.asp) to see if you were right about it.
* **Use brute force**. For this you will require to write a simple programme or ask somebody to do it for you, but the key idea here is to have a script taking your original file and decoding it using all encoders in that programming language knows of. Then it will be up to you to open each decoded file individually and verify if it worked or not.

> **Comments:**
> **username_1**: Preventive comment: I am intimately familiar with the difference between UCS and UTF.  I chose to conflate the two for keeping the answer (that focuses on the rationale behind the existence of several encodings) more to the point. :)  
> **username_2**: I less words, he has the wrong file editor or viewer.  
> **username_1**: @FernandoBaltazar - nope, 3MF is a textual, XML-based format. Any text editor is capable of displaying it correctly. The problem is either the unexpected encoding or the file being corrupted/not being a 3MF one.  
> **username_2**: This happens if you are using a wrong file editor or viewer, even if the file might be corrupted. All windows files has internally this ascii code.  
> **username_1**: @FernandoBaltazar - I suspect you are using the wrong terms to express yourself.  Windows never used ASCII as a character set.  As far as I know the first version of Windows already had CP 1252, while DOS used CP 437.  I am not a Windows expert, but I believe Windows switched to Unicode/UTF-16 with the XP edition.  
> **username_2**: try to see a file inside with the wrong file editor, then make a comment; I personally modified some programs on 1990 and still I do with some files. Is nice to see the ascii and hex, while externally CPXX and UTF-xx are to see text and wyswyg, of course on DOS computers was an oddisey to get it.   If Tom Unger can't read the file with the right file editor or viewer then the file is corrupted, just like this with less words.  
> **username_3**: "The file is compressed"; this is true. In Ubuntu, the default app to open it is Archive Manager. For example, as I opened a .3mf file as a compressed one, there were three directories and a file in it.  

---

### Answer by username_2 on 2018-01-17. Score: 0

Seems to be your are trying to edit a file with the wrong file editor.

If you have Microsoft® Windows® 8.1, you can print directly using the 3MF format included. Simply set the print options in the 3D Print PropertyManager and print to the 3D printer. A preview of the print bed and the model's location within the print bed lets you modify settings before committing to a 3D print job.

To access the 3D print dialog box and specify print options, click File > 3DPrint. The print dialog box that is available depends on your installed 3D print driver.

If you need to get the STL you may need to use a file conversion, [here](https://www.youtube.com/watch?v=6MVeFiCN7bA) is a youtube tutorial to makeprintable


---

