diff --git a/mod/hotpot/view.php b/mod/hotpot/view.php
index 648e28c9f38..992379835cd 100644
--- a/mod/hotpot/view.php
+++ b/mod/hotpot/view.php
@@ -440,9 +440,22 @@
break;
} // end switch $framename
break;
+ case HOTPOT_NAVIGATION_GIVEUP:
+ // replace charset , if necessary
+ // HotPots are plain ascii (iso-8859-1) with unicode chars encoded as HTML entities
+ $charset = get_string("thischarset");
+ if ($charset == 'iso-8859-1') {
+ // do nothing
+ } else {
+ $hp->html = preg_replace(
+ '|]*charset=iso-8859-1[^>]*>|is',
+ '',
+ $hp->html
+ );
+ }
+ // no break (continue to print html to browser)
default:
// HOTPOT_NAVIGATION_BUTTONS
- // HOTPOT_NAVIGATION_GIVEUP
// HOTPOT_NAVIGATION_NONE
if (!empty($available_msg)) {
$hp->insert_message('', $available_msg);