diff --git a/doc/asn1c-usage.html b/doc/asn1c-usage.html
index 8bd76d68..b16e7889 100644
--- a/doc/asn1c-usage.html
+++ b/doc/asn1c-usage.html
@@ -1051,7 +1051,7 @@ the file main.c:
fprintf(stderr, ''Specify filename for BER output\n'');
} else {
const char *filename = av[1];
- FILE *fp = fopen(filename, ''w''); /* for BER output */
+ FILE *fp = fopen(filename, ''wb''); /* for BER output */
if(!fp) {
perror(filename);
diff --git a/doc/asn1c-usage.lyx b/doc/asn1c-usage.lyx
index f000c895..51445f35 100644
--- a/doc/asn1c-usage.lyx
+++ b/doc/asn1c-usage.lyx
@@ -2296,7 +2296,7 @@ n
\begin_inset Quotes sld
\end_inset
-w
+wb
\begin_inset Quotes srd
\end_inset
diff --git a/doc/asn1c-usage.pdf b/doc/asn1c-usage.pdf
index 90168cd8..621c1cb2 100644
Binary files a/doc/asn1c-usage.pdf and b/doc/asn1c-usage.pdf differ