├── .gitignore ├── .travis.yml ├── Cargo.toml ├── README.md ├── benches └── bench.rs ├── moonstone-short.txt ├── src ├── decode.rs ├── encode.rs ├── entities.rs ├── io_support.rs └── lib.rs └── tests └── test.rs /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | Cargo.lock 3 | target -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: rust 2 | env: 3 | global: 4 | - secure: Q/5Dl3Pme4W1wFRm+hIbXKRVDTvz1LXDjWM1p+mfOE3JDRoe/enoO2OqTdnKPJCMAAgz5ybC/K9IGGlBSxvaSzmS/dvKg7vsP2VsZgRxJ4ICxdRnzBqv8c6yINb+g8Br9juRDuLve0kDKvZ5PsYCKfvW7Br9miVQF8RfmV3KUG0= 5 | script: 6 | - cargo build -v 7 | - cargo test -v 8 | - cargo doc -v 9 | after_script: 10 | - curl http://www.rust-ci.org/artifacts/put?t=$RUSTCI_TOKEN | sh 11 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "htmlescape" 3 | version = "0.3.1" 4 | authors = [ "Viktor Dahl " ] 5 | license = "Apache-2.0 / MIT / MPL-2.0" 6 | repository = "https://github.com/veddan/rust-htmlescape" 7 | description = "A library for HTML entity encoding and decoding" 8 | 9 | [lib] 10 | name = "htmlescape" 11 | path = "src/lib.rs" 12 | 13 | [dev-dependencies] 14 | num = "0.1.26" 15 | rand = "0.3.14" 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A HTML entity encoding library for Rust 2 | [![Build Status](https://travis-ci.org/veddan/rust-htmlescape.png?branch=master)](https://travis-ci.org/veddan/rust-htmlescape) 3 | 4 | ## Example usage 5 | All example assume a `extern crate htmlescape;` and `use htmlescape::{relevant functions here};` is present. 6 | 7 | ###Encoding 8 | `htmlescape::encode_minimal()` encodes an input string using a minimal set of HTML entities. 9 | 10 | ```rust 11 | let title = "Cats & dogs"; 12 | let tag = format!("{}", encode_minimal(title)); 13 | assert_eq!(tag.as_slice(), "Cats & dogs"); 14 | ``` 15 | 16 | There is also a `htmlescape::encode_attribute()` function for encoding strings that are to be used 17 | as html attribute values. 18 | 19 | ###Decoding 20 | `htmlescape::decode_html()` decodes an encoded string, replacing HTML entities with the 21 | corresponding characters. Named, hex, and decimal entities are supported. A `Result` value is 22 | returned, with either the decoded string in `Ok`, or an error in `Err`. 23 | 24 | ```rust 25 | let encoded = "Cats & dogs"; 26 | let decoded = match decode_html(encoded) { 27 | Err(reason) => panic!("Error {:?} at character {}", reason.kind, reason.position), 28 | Ok(s) => s 29 | }; 30 | assert_eq!(decoded.as_slice(), "Cats & dogs"); 31 | ``` 32 | 33 | ###Avoiding allocations 34 | Both the encoding and decoding functions are available in forms that take a `Writer` for output rather 35 | than returning an `String`. These version can be used to avoid allocation and copying if the returned 36 | `String` was just going to be written to a `Writer` anyway. 37 | -------------------------------------------------------------------------------- /benches/bench.rs: -------------------------------------------------------------------------------- 1 | #![feature(test)] 2 | 3 | extern crate htmlescape; 4 | 5 | extern crate test; 6 | extern crate num; 7 | extern crate rand; 8 | 9 | use htmlescape::*; 10 | 11 | static BIG_STR: &'static str = include_str!("../moonstone-short.txt"); 12 | 13 | #[bench] 14 | fn bench_encode_attribute(bh: &mut test::Bencher) { 15 | bh.iter(|| { encode_attribute(BIG_STR) }); 16 | bh.bytes = BIG_STR.len() as u64; 17 | } 18 | 19 | #[bench] 20 | fn bench_encode_minimal(bh: &mut test::Bencher) { 21 | bh.iter(|| { encode_minimal(BIG_STR) }); 22 | bh.bytes = BIG_STR.len() as u64; 23 | } 24 | 25 | #[bench] 26 | fn bench_decode_attribute(bh: &mut test::Bencher) { 27 | let encoded = encode_attribute(BIG_STR); 28 | bh.iter(|| { decode_html(&encoded) }); 29 | bh.bytes = encoded.len() as u64; 30 | } 31 | 32 | #[bench] 33 | fn bench_decode_minimal(bh: &mut test::Bencher) { 34 | let encoded = encode_minimal(BIG_STR); 35 | bh.iter(|| { decode_html(&encoded) }); 36 | bh.bytes = encoded.len() as u64; 37 | } 38 | -------------------------------------------------------------------------------- /moonstone-short.txt: -------------------------------------------------------------------------------- 1 | The Project Gutenberg EBook of The Moonstone, by Wilkie Collins 2 | 3 | This eBook is for the use of anyone anywhere at no cost and with 4 | almost no restrictions whatsoever. You may copy it, give it away or 5 | re-use it under the terms of the Project Gutenberg License included 6 | with this eBook or online at www.gutenberg.org 7 | 8 | 9 | Title: The Moonstone 10 | 11 | Author: Wilkie Collins 12 | 13 | Release Date: January 12, 2006 [EBook #155] 14 | Last updated: October 20, 2011 15 | Last updated: January 29, 2013 16 | 17 | Language: English 18 | 19 | 20 | *** START OF THIS PROJECT GUTENBERG EBOOK THE MOONSTONE *** 21 | 22 | 23 | 24 | 25 | Produced by John Hamm and David Widger 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | THE MOONSTONE 34 | 35 | A Romance 36 | 37 | by Wilkie Collins 38 | 39 | 40 | 41 | 42 | PROLOGUE 43 | 44 | THE STORMING OF SERINGAPATAM (1799) 45 | 46 | 47 | Extracted from a Family Paper 48 | 49 | 50 | I address these lines--written in India--to my relatives in England. 51 | 52 | My object is to explain the motive which has induced me to refuse the 53 | right hand of friendship to my cousin, John Herncastle. The reserve 54 | which I have hitherto maintained in this matter has been misinterpreted 55 | by members of my family whose good opinion I cannot consent to forfeit. 56 | I request them to suspend their decision until they have read my 57 | narrative. And I declare, on my word of honour, that what I am now about 58 | to write is, strictly and literally, the truth. 59 | 60 | The private difference between my cousin and me took its rise in a 61 | great public event in which we were both concerned--the storming of 62 | Seringapatam, under General Baird, on the 4th of May, 1799. 63 | 64 | In order that the circumstances may be clearly understood, I must 65 | revert for a moment to the period before the assault, and to the stories 66 | current in our camp of the treasure in jewels and gold stored up in the 67 | Palace of Seringapatam. 68 | 69 | 70 | 71 | II 72 | 73 | 74 | One of the wildest of these stories related to a Yellow Diamond--a 75 | famous gem in the native annals of India. 76 | 77 | The earliest known traditions describe the stone as having been set in 78 | the forehead of the four-handed Indian god who typifies the Moon. Partly 79 | from its peculiar colour, partly from a superstition which represented 80 | it as feeling the influence of the deity whom it adorned, and growing 81 | and lessening in lustre with the waxing and waning of the moon, it 82 | first gained the name by which it continues to be known in India to 83 | this day--the name of THE MOONSTONE. A similar superstition was once 84 | prevalent, as I have heard, in ancient Greece and Rome; not applying, 85 | however (as in India), to a diamond devoted to the service of a god, but 86 | to a semi-transparent stone of the inferior order of gems, supposed to 87 | be affected by the lunar influences--the moon, in this latter case also, 88 | giving the name by which the stone is still known to collectors in our 89 | own time. 90 | 91 | The adventures of the Yellow Diamond begin with the eleventh century of 92 | the Christian era. 93 | 94 | At that date, the Mohammedan conqueror, Mahmoud of Ghizni, crossed 95 | India; seized on the holy city of Somnauth; and stripped of its 96 | treasures the famous temple, which had stood for centuries--the shrine 97 | of Hindoo pilgrimage, and the wonder of the Eastern world. 98 | 99 | Of all the deities worshipped in the temple, the moon-god alone escaped 100 | the rapacity of the conquering Mohammedans. Preserved by three Brahmins, 101 | the inviolate deity, bearing the Yellow Diamond in its forehead, was 102 | removed by night, and was transported to the second of the sacred cities 103 | of India--the city of Benares. 104 | 105 | Here, in a new shrine--in a hall inlaid with precious stones, under 106 | a roof supported by pillars of gold--the moon-god was set up and 107 | worshipped. Here, on the night when the shrine was completed, Vishnu the 108 | Preserver appeared to the three Brahmins in a dream. 109 | 110 | The deity breathed the breath of his divinity on the Diamond in the 111 | forehead of the god. And the Brahmins knelt and hid their faces in their 112 | robes. The deity commanded that the Moonstone should be watched, from 113 | that time forth, by three priests in turn, night and day, to the end 114 | of the generations of men. And the Brahmins heard, and bowed before his 115 | will. The deity predicted certain disaster to the presumptuous mortal 116 | who laid hands on the sacred gem, and to all of his house and name 117 | who received it after him. And the Brahmins caused the prophecy to be 118 | written over the gates of the shrine in letters of gold. 119 | 120 | One age followed another--and still, generation after generation, the 121 | successors of the three Brahmins watched their priceless Moonstone, 122 | night and day. One age followed another until the first years of the 123 | eighteenth Christian century saw the reign of Aurungzebe, Emperor of the 124 | Moguls. At his command havoc and rapine were let loose once more among 125 | the temples of the worship of Brahmah. The shrine of the four-handed 126 | god was polluted by the slaughter of sacred animals; the images of 127 | the deities were broken in pieces; and the Moonstone was seized by an 128 | officer of rank in the army of Aurungzebe. 129 | 130 | Powerless to recover their lost treasure by open force, the three 131 | guardian priests followed and watched it in disguise. The generations 132 | succeeded each other; the warrior who had committed the sacrilege 133 | perished miserably; the Moonstone passed (carrying its curse with it) 134 | from one lawless Mohammedan hand to another; and still, through all 135 | chances and changes, the successors of the three guardian priests kept 136 | their watch, waiting the day when the will of Vishnu the Preserver 137 | should restore to them their sacred gem. Time rolled on from the first 138 | to the last years of the eighteenth Christian century. The Diamond fell 139 | into the possession of Tippoo, Sultan of Seringapatam, who caused it to 140 | be placed as an ornament in the handle of a dagger, and who commanded 141 | it to be kept among the choicest treasures of his armoury. Even then--in 142 | the palace of the Sultan himself--the three guardian priests still kept 143 | their watch in secret. There were three officers of Tippoo's household, 144 | strangers to the rest, who had won their master's confidence by 145 | conforming, or appearing to conform, to the Mussulman faith; and to 146 | those three men report pointed as the three priests in disguise. 147 | 148 | 149 | 150 | III 151 | 152 | 153 | So, as told in our camp, ran the fanciful story of the Moonstone. It 154 | made no serious impression on any of us except my cousin--whose love 155 | of the marvellous induced him to believe it. On the night before the 156 | assault on Seringapatam, he was absurdly angry with me, and with others, 157 | for treating the whole thing as a fable. A foolish wrangle followed; and 158 | Herncastle's unlucky temper got the better of him. He declared, in 159 | his boastful way, that we should see the Diamond on his finger, if 160 | the English army took Seringapatam. The sally was saluted by a roar of 161 | laughter, and there, as we all thought that night, the thing ended. 162 | 163 | Let me now take you on to the day of the assault. My cousin and I were 164 | separated at the outset. I never saw him when we forded the river; when 165 | we planted the English flag in the first breach; when we crossed the 166 | ditch beyond; and, fighting every inch of our way, entered the town. 167 | It was only at dusk, when the place was ours, and after General Baird 168 | himself had found the dead body of Tippoo under a heap of the slain, 169 | that Herncastle and I met. 170 | 171 | We were each attached to a party sent out by the general's orders to 172 | prevent the plunder and confusion which followed our conquest. The 173 | camp-followers committed deplorable excesses; and, worse still, the 174 | soldiers found their way, by a guarded door, into the treasury of the 175 | Palace, and loaded themselves with gold and jewels. It was in the court 176 | outside the treasury that my cousin and I met, to enforce the laws of 177 | discipline on our own soldiers. Herncastle's fiery temper had been, as 178 | I could plainly see, exasperated to a kind of frenzy by the terrible 179 | slaughter through which we had passed. He was very unfit, in my opinion, 180 | to perform the duty that had been entrusted to him. 181 | 182 | There was riot and confusion enough in the treasury, but no violence 183 | that I saw. The men (if I may use such an expression) disgraced 184 | themselves good-humouredly. All sorts of rough jests and catchwords were 185 | bandied about among them; and the story of the Diamond turned up 186 | again unexpectedly, in the form of a mischievous joke. "Who's got 187 | the Moonstone?" was the rallying cry which perpetually caused the 188 | plundering, as soon as it was stopped in one place, to break out in 189 | another. While I was still vainly trying to establish order, I heard a 190 | frightful yelling on the other side of the courtyard, and at once ran 191 | towards the cries, in dread of finding some new outbreak of the pillage 192 | in that direction. 193 | 194 | I got to an open door, and saw the bodies of two Indians (by their 195 | dress, as I guessed, officers of the palace) lying across the entrance, 196 | dead. 197 | 198 | A cry inside hurried me into a room, which appeared to serve as an 199 | armoury. A third Indian, mortally wounded, was sinking at the feet of a 200 | man whose back was towards me. The man turned at the instant when I came 201 | in, and I saw John Herncastle, with a torch in one hand, and a dagger 202 | dripping with blood in the other. A stone, set like a pommel, in the end 203 | of the dagger's handle, flashed in the torchlight, as he turned on me, 204 | like a gleam of fire. The dying Indian sank to his knees, pointed to 205 | the dagger in Herncastle's hand, and said, in his native language--"The 206 | Moonstone will have its vengeance yet on you and yours!" He spoke those 207 | words, and fell dead on the floor. 208 | 209 | Before I could stir in the matter, the men who had followed me across 210 | the courtyard crowded in. My cousin rushed to meet them, like a madman. 211 | "Clear the room!" he shouted to me, "and set a guard on the door!" The 212 | men fell back as he threw himself on them with his torch and his dagger. 213 | I put two sentinels of my own company, on whom I could rely, to keep the 214 | door. Through the remainder of the night, I saw no more of my cousin. 215 | 216 | Early in the morning, the plunder still going on, General Baird 217 | announced publicly by beat of drum, that any thief detected in the 218 | fact, be he whom he might, should be hung. The provost-marshal was in 219 | attendance, to prove that the General was in earnest; and in the throng 220 | that followed the proclamation, Herncastle and I met again. 221 | 222 | He held out his hand, as usual, and said, "Good morning." 223 | 224 | I waited before I gave him my hand in return. 225 | 226 | "Tell me first," I said, "how the Indian in the armoury met his death, 227 | and what those last words meant, when he pointed to the dagger in your 228 | hand." 229 | 230 | "The Indian met his death, as I suppose, by a mortal wound," said 231 | Herncastle. "What his last words meant I know no more than you do." 232 | 233 | I looked at him narrowly. His frenzy of the previous day had all calmed 234 | down. I determined to give him another chance. 235 | 236 | "Is that all you have to tell me?" I asked. 237 | 238 | He answered, "That is all." 239 | 240 | I turned my back on him; and we have not spoken since. 241 | 242 | 243 | 244 | IV 245 | 246 | 247 | I beg it to be understood that what I write here about my cousin (unless 248 | some necessity should arise for making it public) is for the information 249 | of the family only. Herncastle has said nothing that can justify me in 250 | speaking to our commanding officer. He has been taunted more than once 251 | about the Diamond, by those who recollect his angry outbreak before 252 | the assault; but, as may easily be imagined, his own remembrance of the 253 | circumstances under which I surprised him in the armoury has been 254 | enough to keep him silent. It is reported that he means to exchange into 255 | another regiment, avowedly for the purpose of separating himself from 256 | ME. 257 | 258 | Whether this be true or not, I cannot prevail upon myself to become his 259 | accuser--and I think with good reason. If I made the matter public, I 260 | have no evidence but moral evidence to bring forward. I have not only no 261 | proof that he killed the two men at the door; I cannot even declare that 262 | he killed the third man inside--for I cannot say that my own eyes saw 263 | the deed committed. It is true that I heard the dying Indian's words; 264 | but if those words were pronounced to be the ravings of delirium, 265 | how could I contradict the assertion from my own knowledge? Let our 266 | relatives, on either side, form their own opinion on what I have 267 | written, and decide for themselves whether the aversion I now feel 268 | towards this man is well or ill founded. 269 | 270 | Although I attach no sort of credit to the fantastic Indian legend of 271 | the gem, I must acknowledge, before I conclude, that I am influenced by 272 | a certain superstition of my own in this matter. It is my conviction, 273 | or my delusion, no matter which, that crime brings its own fatality with 274 | it. I am not only persuaded of Herncastle's guilt; I am even fanciful 275 | enough to believe that he will live to regret it, if he keeps the 276 | Diamond; and that others will live to regret taking it from him, if he 277 | gives the Diamond away. 278 | 279 | 280 | 281 | 282 | THE STORY 283 | 284 | 285 | 286 | 287 | FIRST PERIOD 288 | 289 | THE LOSS OF THE DIAMOND (1848) 290 | 291 | 292 | The events related by GABRIEL BETTEREDGE, house-steward in the service 293 | of JULIA, LADY VERINDER. 294 | 295 | 296 | 297 | CHAPTER I 298 | 299 | 300 | In the first part of ROBINSON CRUSOE, at page one hundred and 301 | twenty-nine, you will find it thus written: 302 | 303 | "Now I saw, though too late, the Folly of beginning a Work before we 304 | count the Cost, and before we judge rightly of our own Strength to go 305 | through with it." 306 | 307 | Only yesterday, I opened my ROBINSON CRUSOE at that place. Only this 308 | morning (May twenty-first, Eighteen hundred and fifty), came my lady's 309 | nephew, Mr. Franklin Blake, and held a short conversation with me, as 310 | follows:-- 311 | 312 | "Betteredge," says Mr. Franklin, "I have been to the lawyer's about some 313 | family matters; and, among other things, we have been talking of the 314 | loss of the Indian Diamond, in my aunt's house in Yorkshire, two years 315 | since. Mr. Bruff thinks as I think, that the whole story ought, in the 316 | interests of truth, to be placed on record in writing--and the sooner 317 | the better." 318 | 319 | Not perceiving his drift yet, and thinking it always desirable for the 320 | sake of peace and quietness to be on the lawyer's side, I said I thought 321 | so too. Mr. Franklin went on. 322 | 323 | "In this matter of the Diamond," he said, "the characters of innocent 324 | people have suffered under suspicion already--as you know. The memories 325 | of innocent people may suffer, hereafter, for want of a record of the 326 | facts to which those who come after us can appeal. There can be no doubt 327 | that this strange family story of ours ought to be told. And I think, 328 | Betteredge, Mr. Bruff and I together have hit on the right way of 329 | telling it." 330 | 331 | Very satisfactory to both of them, no doubt. But I failed to see what I 332 | myself had to do with it, so far. 333 | 334 | "We have certain events to relate," Mr. Franklin proceeded; "and we have 335 | certain persons concerned in those events who are capable of relating 336 | them. Starting from these plain facts, the idea is that we should all 337 | write the story of the Moonstone in turn--as far as our own personal 338 | experience extends, and no farther. We must begin by showing how the 339 | Diamond first fell into the hands of my uncle Herncastle, when he was 340 | serving in India fifty years since. This prefatory narrative I have 341 | already got by me in the form of an old family paper, which relates the 342 | necessary particulars on the authority of an eye-witness. The next thing 343 | to do is to tell how the Diamond found its way into my aunt's house in 344 | Yorkshire, two years ago, and how it came to be lost in little more than 345 | twelve hours afterwards. Nobody knows as much as you do, Betteredge, 346 | about what went on in the house at that time. So you must take the pen 347 | in hand, and start the story." 348 | 349 | In those terms I was informed of what my personal concern was with the 350 | matter of the Diamond. If you are curious to know what course I took 351 | under the circumstances, I beg to inform you that I did what you would 352 | probably have done in my place. I modestly declared myself to be quite 353 | unequal to the task imposed upon me--and I privately felt, all the time, 354 | that I was quite clever enough to perform it, if I only gave my own 355 | abilities a fair chance. Mr. Franklin, I imagine, must have seen my 356 | private sentiments in my face. He declined to believe in my modesty; and 357 | he insisted on giving my abilities a fair chance. 358 | 359 | Two hours have passed since Mr. Franklin left me. As soon as his back 360 | was turned, I went to my writing desk to start the story. There I have 361 | sat helpless (in spite of my abilities) ever since; seeing what Robinson 362 | Crusoe saw, as quoted above--namely, the folly of beginning a work 363 | before we count the cost, and before we judge rightly of our own 364 | strength to go through with it. Please to remember, I opened the book 365 | by accident, at that bit, only the day before I rashly undertook the 366 | business now in hand; and, allow me to ask--if THAT isn't prophecy, what 367 | is? 368 | 369 | I am not superstitious; I have read a heap of books in my time; I am 370 | a scholar in my own way. Though turned seventy, I possess an active 371 | memory, and legs to correspond. You are not to take it, if you please, 372 | as the saying of an ignorant man, when I express my opinion that such 373 | a book as ROBINSON CRUSOE never was written, and never will be written 374 | again. I have tried that book for years--generally in combination with 375 | a pipe of tobacco--and I have found it my friend in need in all the 376 | necessities of this mortal life. When my spirits are bad--ROBINSON 377 | CRUSOE. When I want advice--ROBINSON CRUSOE. In past times when my wife 378 | plagued me; in present times when I have had a drop too much--ROBINSON 379 | CRUSOE. I have worn out six stout ROBINSON CRUSOES with hard work in my 380 | service. On my lady's last birthday she gave me a seventh. I took a drop 381 | too much on the strength of it; and ROBINSON CRUSOE put me right again. 382 | Price four shillings and sixpence, bound in blue, with a picture into 383 | the bargain. 384 | 385 | Still, this don't look much like starting the story of the Diamond--does 386 | it? I seem to be wandering off in search of Lord knows what, Lord knows 387 | where. We will take a new sheet of paper, if you please, and begin over 388 | again, with my best respects to you. 389 | 390 | 391 | 392 | CHAPTER II 393 | 394 | 395 | I spoke of my lady a line or two back. Now the Diamond could never have 396 | been in our house, where it was lost, if it had not been made a present 397 | of to my lady's daughter; and my lady's daughter would never have been 398 | in existence to have the present, if it had not been for my lady who 399 | (with pain and travail) produced her into the world. Consequently, if we 400 | begin with my lady, we are pretty sure of beginning far enough back. And 401 | that, let me tell you, when you have got such a job as mine in hand, is 402 | a real comfort at starting. 403 | 404 | If you know anything of the fashionable world, you have heard tell of 405 | the three beautiful Miss Herncastles. Miss Adelaide; Miss Caroline; 406 | and Miss Julia--this last being the youngest and the best of the three 407 | sisters, in my opinion; and I had opportunities of judging, as you shall 408 | presently see. I went into the service of the old lord, their father 409 | (thank God, we have got nothing to do with him, in this business of the 410 | Diamond; he had the longest tongue and the shortest temper of any man, 411 | high or low, I ever met with)--I say, I went into the service of the old 412 | lord, as page-boy in waiting on the three honourable young ladies, at 413 | the age of fifteen years. There I lived till Miss Julia married the late 414 | Sir John Verinder. An excellent man, who only wanted somebody to manage 415 | him; and, between ourselves, he found somebody to do it; and what is 416 | more, he throve on it and grew fat on it, and lived happy and died 417 | easy on it, dating from the day when my lady took him to church to be 418 | married, to the day when she relieved him of his last breath, and closed 419 | his eyes for ever. 420 | 421 | I have omitted to state that I went with the bride to the bride's 422 | husband's house and lands down here. "Sir John," she says, "I can't 423 | do without Gabriel Betteredge." "My lady," says Sir John, "I can't do 424 | without him, either." That was his way with her--and that was how I 425 | went into his service. It was all one to me where I went, so long as my 426 | mistress and I were together. 427 | 428 | Seeing that my lady took an interest in the out-of-door work, and the 429 | farms, and such like, I took an interest in them too--with all the more 430 | reason that I was a small farmer's seventh son myself. My lady got me 431 | put under the bailiff, and I did my best, and gave satisfaction, and got 432 | promotion accordingly. Some years later, on the Monday as it might be, 433 | my lady says, "Sir John, your bailiff is a stupid old man. Pension him 434 | liberally, and let Gabriel Betteredge have his place." On the Tuesday 435 | as it might be, Sir John says, "My lady, the bailiff is pensioned 436 | liberally; and Gabriel Betteredge has got his place." You hear more than 437 | enough of married people living together miserably. Here is an 438 | example to the contrary. Let it be a warning to some of you, and an 439 | encouragement to others. In the meantime, I will go on with my story. 440 | 441 | Well, there I was in clover, you will say. Placed in a position of trust 442 | and honour, with a little cottage of my own to live in, with my rounds 443 | on the estate to occupy me in the morning, and my accounts in the 444 | afternoon, and my pipe and my ROBINSON CRUSOE in the evening--what more 445 | could I possibly want to make me happy? Remember what Adam wanted when 446 | he was alone in the Garden of Eden; and if you don't blame it in Adam, 447 | don't blame it in me. 448 | 449 | The woman I fixed my eye on, was the woman who kept house for me at my 450 | cottage. Her name was Selina Goby. I agree with the late William Cobbett 451 | about picking a wife. See that she chews her food well and sets her foot 452 | down firmly on the ground when she walks, and you're all right. Selina 453 | Goby was all right in both these respects, which was one reason for 454 | marrying her. I had another reason, likewise, entirely of my own 455 | discovering. Selina, being a single woman, made me pay so much a week 456 | for her board and services. Selina, being my wife, couldn't charge for 457 | her board, and would have to give me her services for nothing. That was 458 | the point of view I looked at it from. Economy--with a dash of love. I 459 | put it to my mistress, as in duty bound, just as I had put it to myself. 460 | 461 | "I have been turning Selina Goby over in my mind," I said, "and I think, 462 | my lady, it will be cheaper to marry her than to keep her." 463 | 464 | My lady burst out laughing, and said she didn't know which to be most 465 | shocked at--my language or my principles. Some joke tickled her, I 466 | suppose, of the sort that you can't take unless you are a person of 467 | quality. Understanding nothing myself but that I was free to put it next 468 | to Selina, I went and put it accordingly. And what did Selina say? Lord! 469 | how little you must know of women, if you ask that. Of course she said, 470 | Yes. 471 | 472 | As my time drew nearer, and there got to be talk of my having a new coat 473 | for the ceremony, my mind began to misgive me. I have compared notes 474 | with other men as to what they felt while they were in my interesting 475 | situation; and they have all acknowledged that, about a week before it 476 | happened, they privately wished themselves out of it. I went a trifle 477 | further than that myself; I actually rose up, as it were, and tried to 478 | get out of it. Not for nothing! I was too just a man to expect she would 479 | let me off for nothing. Compensation to the woman when the man gets 480 | out of it, is one of the laws of England. In obedience to the laws, 481 | and after turning it over carefully in my mind, I offered Selina Goby a 482 | feather-bed and fifty shillings to be off the bargain. You will hardly 483 | believe it, but it is nevertheless true--she was fool enough to refuse. 484 | 485 | After that it was all over with me, of course. I got the new coat as 486 | cheap as I could, and I went through all the rest of it as cheap as I 487 | could. We were not a happy couple, and not a miserable couple. We were 488 | six of one and half-a-dozen of the other. How it was I don't understand, 489 | but we always seemed to be getting, with the best of motives, in one 490 | another's way. When I wanted to go up-stairs, there was my wife coming 491 | down; or when my wife wanted to go down, there was I coming up. That is 492 | married life, according to my experience of it. 493 | 494 | After five years of misunderstandings on the stairs, it pleased an 495 | all-wise Providence to relieve us of each other by taking my wife. I 496 | was left with my little girl Penelope, and with no other child. Shortly 497 | afterwards Sir John died, and my lady was left with her little girl, 498 | Miss Rachel, and no other child. I have written to very poor purpose 499 | of my lady, if you require to be told that my little Penelope was taken 500 | care of, under my good mistress's own eye, and was sent to school and 501 | taught, and made a sharp girl, and promoted, when old enough, to be Miss 502 | Rachel's own maid. 503 | 504 | As for me, I went on with my business as bailiff year after year up to 505 | Christmas 1847, when there came a change in my life. On that day, my 506 | lady invited herself to a cup of tea alone with me in my cottage. She 507 | remarked that, reckoning from the year when I started as page-boy in the 508 | time of the old lord, I had been more than fifty years in her service, 509 | and she put into my hands a beautiful waistcoat of wool that she had 510 | worked herself, to keep me warm in the bitter winter weather. 511 | 512 | I received this magnificent present quite at a loss to find words to 513 | thank my mistress with for the honour she had done me. To my great 514 | astonishment, it turned out, however, that the waistcoat was not an 515 | honour, but a bribe. My lady had discovered that I was getting old 516 | before I had discovered it myself, and she had come to my cottage to 517 | wheedle me (if I may use such an expression) into giving up my hard 518 | out-of-door work as bailiff, and taking my ease for the rest of my 519 | days as steward in the house. I made as good a fight of it against the 520 | indignity of taking my ease as I could. But my mistress knew the weak 521 | side of me; she put it as a favour to herself. The dispute between us 522 | ended, after that, in my wiping my eyes, like an old fool, with my new 523 | woollen waistcoat, and saying I would think about it. 524 | 525 | The perturbation in my mind, in regard to thinking about it, being truly 526 | dreadful after my lady had gone away, I applied the remedy which I have 527 | never yet found to fail me in cases of doubt and emergency. I smoked a 528 | pipe and took a turn at ROBINSON CRUSOE. Before I had occupied myself 529 | with that extraordinary book five minutes, I came on a comforting bit 530 | (page one hundred and fifty-eight), as follows: "To-day we love, what 531 | to-morrow we hate." I saw my way clear directly. To-day I was all for 532 | continuing to be farm-bailiff; to-morrow, on the authority of ROBINSON 533 | CRUSOE, I should be all the other way. Take myself to-morrow while in 534 | to-morrow's humour, and the thing was done. My mind being relieved 535 | in this manner, I went to sleep that night in the character of Lady 536 | Verinder's farm bailiff, and I woke up the next morning in the character 537 | of Lady Verinder's house-steward. All quite comfortable, and all through 538 | ROBINSON CRUSOE! 539 | 540 | My daughter Penelope has just looked over my shoulder to see what I have 541 | done so far. She remarks that it is beautifully written, and every word 542 | of it true. But she points out one objection. She says what I have done 543 | so far isn't in the least what I was wanted to do. I am asked to tell 544 | the story of the Diamond and, instead of that, I have been telling the 545 | story of my own self. Curious, and quite beyond me to account for. I 546 | wonder whether the gentlemen who make a business and a living out of 547 | writing books, ever find their own selves getting in the way of their 548 | subjects, like me? If they do, I can feel for them. In the meantime, 549 | here is another false start, and more waste of good writing-paper. 550 | What's to be done now? Nothing that I know of, except for you to keep 551 | your temper, and for me to begin it all over again for the third time. 552 | 553 | 554 | 555 | CHAPTER III 556 | 557 | 558 | The question of how I am to start the story properly I have tried to 559 | settle in two ways. First, by scratching my head, which led to nothing. 560 | Second, by consulting my daughter Penelope, which has resulted in an 561 | entirely new idea. 562 | 563 | Penelope's notion is that I should set down what happened, regularly day 564 | by day, beginning with the day when we got the news that Mr. Franklin 565 | Blake was expected on a visit to the house. When you come to fix your 566 | memory with a date in this way, it is wonderful what your memory will 567 | pick up for you upon that compulsion. The only difficulty is to fetch 568 | out the dates, in the first place. This Penelope offers to do for me by 569 | looking into her own diary, which she was taught to keep when she was 570 | at school, and which she has gone on keeping ever since. In answer to an 571 | improvement on this notion, devised by myself, namely, that she should 572 | tell the story instead of me, out of her own diary, Penelope observes, 573 | with a fierce look and a red face, that her journal is for her own 574 | private eye, and that no living creature shall ever know what is in 575 | it but herself. When I inquire what this means, Penelope says, 576 | "Fiddlesticks!" I say, Sweethearts. 577 | 578 | Beginning, then, on Penelope's plan, I beg to mention that I was 579 | specially called one Wednesday morning into my lady's own sitting-room, 580 | the date being the twenty-fourth of May, Eighteen hundred and 581 | forty-eight. 582 | 583 | "Gabriel," says my lady, "here is news that will surprise you. Franklin 584 | Blake has come back from abroad. He has been staying with his father in 585 | London, and he is coming to us to-morrow to stop till next month, and 586 | keep Rachel's birthday." 587 | 588 | If I had had a hat in my hand, nothing but respect would have prevented 589 | me from throwing that hat up to the ceiling. I had not seen Mr. Franklin 590 | since he was a boy, living along with us in this house. He was, out of 591 | all sight (as I remember him), the nicest boy that ever spun a top or 592 | broke a window. Miss Rachel, who was present, and to whom I made 593 | that remark, observed, in return, that SHE remembered him as the most 594 | atrocious tyrant that ever tortured a doll, and the hardest driver of an 595 | exhausted little girl in string harness that England could produce. "I 596 | burn with indignation, and I ache with fatigue," was the way Miss Rachel 597 | summed it up, "when I think of Franklin Blake." 598 | 599 | Hearing what I now tell you, you will naturally ask how it was that Mr. 600 | Franklin should have passed all the years, from the time when he was 601 | a boy to the time when he was a man, out of his own country. I answer, 602 | because his father had the misfortune to be next heir to a Dukedom, and 603 | not to be able to prove it. 604 | 605 | In two words, this was how the thing happened: 606 | 607 | My lady's eldest sister married the celebrated Mr. Blake--equally famous 608 | for his great riches, and his great suit at law. How many years he 609 | went on worrying the tribunals of his country to turn out the Duke in 610 | possession, and to put himself in the Duke's place--how many lawyer's 611 | purses he filled to bursting, and how many otherwise harmless people 612 | he set by the ears together disputing whether he was right or wrong--is 613 | more by a great deal than I can reckon up. His wife died, and two of his 614 | three children died, before the tribunals could make up their minds to 615 | show him the door and take no more of his money. When it was all over, 616 | and the Duke in possession was left in possession, Mr. Blake discovered 617 | that the only way of being even with his country for the manner in 618 | which it had treated him, was not to let his country have the honour 619 | of educating his son. "How can I trust my native institutions," was the 620 | form in which he put it, "after the way in which my native institutions 621 | have behaved to ME?" Add to this, that Mr. Blake disliked all boys, 622 | his own included, and you will admit that it could only end in one 623 | way. Master Franklin was taken from us in England, and was sent to 624 | institutions which his father COULD trust, in that superior country, 625 | Germany; Mr. Blake himself, you will observe, remaining snug in England, 626 | to improve his fellow-countrymen in the Parliament House, and to publish 627 | a statement on the subject of the Duke in possession, which has remained 628 | an unfinished statement from that day to this. 629 | 630 | There! thank God, that's told! Neither you nor I need trouble our heads 631 | any more about Mr. Blake, senior. Leave him to the Dukedom; and let you 632 | and I stick to the Diamond. 633 | 634 | The Diamond takes us back to Mr. Franklin, who was the innocent means of 635 | bringing that unlucky jewel into the house. 636 | 637 | Our nice boy didn't forget us after he went abroad. He wrote every now 638 | and then; sometimes to my lady, sometimes to Miss Rachel, and sometimes 639 | to me. We had had a transaction together, before he left, which 640 | consisted in his borrowing of me a ball of string, a four-bladed knife, 641 | and seven-and-sixpence in money--the colour of which last I have not 642 | seen, and never expect to see again. His letters to me chiefly related 643 | to borrowing more. I heard, however, from my lady, how he got on 644 | abroad, as he grew in years and stature. After he had learnt what the 645 | institutions of Germany could teach him, he gave the French a turn next, 646 | and the Italians a turn after that. They made him among them a sort of 647 | universal genius, as well as I could understand it. He wrote a 648 | little; he painted a little; he sang and played and composed a 649 | little--borrowing, as I suspect, in all these cases, just as he had 650 | borrowed from me. His mother's fortune (seven hundred a year) fell to 651 | him when he came of age, and ran through him, as it might be through a 652 | sieve. The more money he had, the more he wanted; there was a hole in 653 | Mr. Franklin's pocket that nothing would sew up. Wherever he went, the 654 | lively, easy way of him made him welcome. He lived here, there, and 655 | everywhere; his address (as he used to put it himself) being "Post 656 | Office, Europe--to be left till called for." Twice over, he made up his 657 | mind to come back to England and see us; and twice over (saving your 658 | presence), some unmentionable woman stood in the way and stopped him. 659 | His third attempt succeeded, as you know already from what my lady told 660 | me. On Thursday the twenty-fifth of May, we were to see for the first 661 | time what our nice boy had grown to be as a man. He came of good blood; 662 | he had a high courage; and he was five-and-twenty years of age, by our 663 | reckoning. Now you know as much of Mr. Franklin Blake as I did--before 664 | Mr. Franklin Blake came down to our house. 665 | 666 | The Thursday was as fine a summer's day as ever you saw: and my lady and 667 | Miss Rachel (not expecting Mr. Franklin till dinner-time) drove out to 668 | lunch with some friends in the neighbourhood. 669 | 670 | When they were gone, I went and had a look at the bedroom which had 671 | been got ready for our guest, and saw that all was straight. Then, 672 | being butler in my lady's establishment, as well as steward (at my own 673 | particular request, mind, and because it vexed me to see anybody but 674 | myself in possession of the key of the late Sir John's cellar)--then, 675 | I say, I fetched up some of our famous Latour claret, and set it in the 676 | warm summer air to take off the chill before dinner. Concluding to set 677 | myself in the warm summer air next--seeing that what is good for old 678 | claret is equally good for old age--I took up my beehive chair to go out 679 | into the back court, when I was stopped by hearing a sound like the soft 680 | beating of a drum, on the terrace in front of my lady's residence. 681 | 682 | Going round to the terrace, I found three mahogany-coloured Indians, in 683 | white linen frocks and trousers, looking up at the house. 684 | 685 | The Indians, as I saw on looking closer, had small hand-drums slung in 686 | front of them. Behind them stood a little delicate-looking light-haired 687 | English boy carrying a bag. I judged the fellows to be strolling 688 | conjurors, and the boy with the bag to be carrying the tools of their 689 | trade. One of the three, who spoke English and who exhibited, I must 690 | own, the most elegant manners, presently informed me that my judgment 691 | was right. He requested permission to show his tricks in the presence of 692 | the lady of the house. 693 | 694 | Now I am not a sour old man. I am generally all for amusement, and the 695 | last person in the world to distrust another person because he happens 696 | to be a few shades darker than myself. But the best of us have our 697 | weaknesses--and my weakness, when I know a family plate-basket to be 698 | out on a pantry-table, is to be instantly reminded of that basket by the 699 | sight of a strolling stranger whose manners are superior to my own. I 700 | accordingly informed the Indian that the lady of the house was out; and 701 | I warned him and his party off the premises. He made me a beautiful bow 702 | in return; and he and his party went off the premises. On my side, I 703 | returned to my beehive chair, and set myself down on the sunny side of 704 | the court, and fell (if the truth must be owned), not exactly into a 705 | sleep, but into the next best thing to it. 706 | 707 | I was roused up by my daughter Penelope running out at me as if the 708 | house was on fire. What do you think she wanted? She wanted to have the 709 | three Indian jugglers instantly taken up; for this reason, namely, that 710 | they knew who was coming from London to visit us, and that they meant 711 | some mischief to Mr. Franklin Blake. 712 | 713 | Mr. Franklin's name roused me. I opened my eyes, and made my girl 714 | explain herself. 715 | 716 | It appeared that Penelope had just come from our lodge, where she had 717 | been having a gossip with the lodge-keeper's daughter. The two girls 718 | had seen the Indians pass out, after I had warned them off, followed by 719 | their little boy. Taking it into their heads that the boy was ill-used 720 | by the foreigners--for no reason that I could discover, except that 721 | he was pretty and delicate-looking--the two girls had stolen along the 722 | inner side of the hedge between us and the road, and had watched the 723 | proceedings of the foreigners on the outer side. Those proceedings 724 | resulted in the performance of the following extraordinary tricks. 725 | 726 | They first looked up the road, and down the road, and made sure that 727 | they were alone. Then they all three faced about, and stared hard in 728 | the direction of our house. Then they jabbered and disputed in their 729 | own language, and looked at each other like men in doubt. Then they 730 | all turned to their little English boy, as if they expected HIM to help 731 | them. And then the chief Indian, who spoke English, said to the boy, 732 | "Hold out your hand." 733 | 734 | On hearing those dreadful words, my daughter Penelope said she didn't 735 | know what prevented her heart from flying straight out of her. I thought 736 | privately that it might have been her stays. All I said, however, 737 | was, "You make my flesh creep." (NOTA BENE: Women like these little 738 | compliments.) 739 | 740 | Well, when the Indian said, "Hold out your hand," the boy shrunk back, 741 | and shook his head, and said he didn't like it. The Indian, thereupon, 742 | asked him (not at all unkindly), whether he would like to be sent back 743 | to London, and left where they had found him, sleeping in an empty 744 | basket in a market--a hungry, ragged, and forsaken little boy. This, it 745 | seems, ended the difficulty. The little chap unwillingly held out his 746 | hand. Upon that, the Indian took a bottle from his bosom, and poured out 747 | of it some black stuff, like ink, into the palm of the boy's hand. The 748 | Indian--first touching the boy's head, and making signs over it in the 749 | air--then said, "Look." The boy became quite stiff, and stood like a 750 | statue, looking into the ink in the hollow of his hand. 751 | 752 | (So far, it seemed to me to be juggling, accompanied by a foolish waste 753 | of ink. I was beginning to feel sleepy again, when Penelope's next words 754 | stirred me up.) 755 | 756 | The Indians looked up the road and down the road once more--and then 757 | the chief Indian said these words to the boy; "See the English gentleman 758 | from foreign parts." 759 | 760 | The boy said, "I see him." 761 | 762 | The Indian said, "Is it on the road to this house, and on no other, that 763 | the English gentleman will travel to-day?" 764 | 765 | The boy said, "It is on the road to this house, and on no other, that 766 | the English gentleman will travel to-day." The Indian put a second 767 | question--after waiting a little first. He said: "Has the English 768 | gentleman got It about him?" 769 | 770 | The boy answered--also, after waiting a little first--"Yes." 771 | 772 | The Indian put a third and last question: "Will the English gentleman 773 | come here, as he has promised to come, at the close of day?" 774 | 775 | The boy said, "I can't tell." 776 | 777 | The Indian asked why. 778 | 779 | The boy said, "I am tired. The mist rises in my head, and puzzles me. I 780 | can see no more to-day." 781 | 782 | With that the catechism ended. The chief Indian said something in his 783 | own language to the other two, pointing to the boy, and pointing towards 784 | the town, in which (as we afterwards discovered) they were lodged. He 785 | then, after making more signs on the boy's head, blew on his forehead, 786 | and so woke him up with a start. After that, they all went on their way 787 | towards the town, and the girls saw them no more. 788 | 789 | Most things they say have a moral, if you only look for it. What was the 790 | moral of this? 791 | 792 | The moral was, as I thought: First, that the chief juggler had heard Mr. 793 | Franklin's arrival talked of among the servants out-of-doors, and saw 794 | his way to making a little money by it. Second, that he and his men and 795 | boy (with a view to making the said money) meant to hang about till 796 | they saw my lady drive home, and then to come back, and foretell 797 | Mr. Franklin's arrival by magic. Third, that Penelope had heard them 798 | rehearsing their hocus-pocus, like actors rehearsing a play. Fourth, 799 | that I should do well to have an eye, that evening, on the plate-basket. 800 | Fifth, that Penelope would do well to cool down, and leave me, her 801 | father, to doze off again in the sun. 802 | 803 | That appeared to me to be the sensible view. If you know anything of 804 | the ways of young women, you won't be surprised to hear that Penelope 805 | wouldn't take it. The moral of the thing was serious, according to my 806 | daughter. She particularly reminded me of the Indian's third question, 807 | Has the English gentleman got It about him? "Oh, father!" says Penelope, 808 | clasping her hands, "don't joke about this. What does 'It' mean?" 809 | 810 | "We'll ask Mr. Franklin, my dear," I said, "if you can wait till Mr. 811 | Franklin comes." I winked to show I meant that in joke. Penelope took it 812 | quite seriously. My girl's earnestness tickled me. "What on earth should 813 | Mr. Franklin know about it?" I inquired. "Ask him," says Penelope. "And 814 | see whether HE thinks it a laughing matter, too." With that parting 815 | shot, my daughter left me. 816 | 817 | I settled it with myself, when she was gone, that I really would ask Mr. 818 | Franklin--mainly to set Penelope's mind at rest. What was said between 819 | us, when I did ask him, later on that same day, you will find set 820 | out fully in its proper place. But as I don't wish to raise your 821 | expectations and then disappoint them, I will take leave to warn you 822 | here--before we go any further--that you won't find the ghost of a 823 | joke in our conversation on the subject of the jugglers. To my great 824 | surprise, Mr. Franklin, like Penelope, took the thing seriously. How 825 | seriously, you will understand, when I tell you that, in his opinion, 826 | "It" meant the Moonstone. 827 | 828 | 829 | 830 | CHAPTER IV 831 | 832 | 833 | I am truly sorry to detain you over me and my beehive chair. A sleepy 834 | old man, in a sunny back yard, is not an interesting object, I am well 835 | aware. But things must be put down in their places, as things actually 836 | happened--and you must please to jog on a little while longer with me, 837 | in expectation of Mr. Franklin Blake's arrival later in the day. 838 | 839 | Before I had time to doze off again, after my daughter Penelope had left 840 | me, I was disturbed by a rattling of plates and dishes in the servants' 841 | hall, which meant that dinner was ready. Taking my own meals in my own 842 | sitting-room, I had nothing to do with the servants' dinner, except to 843 | wish them a good stomach to it all round, previous to composing myself 844 | once more in my chair. I was just stretching my legs, when out 845 | bounced another woman on me. Not my daughter again; only Nancy, the 846 | kitchen-maid, this time. I was straight in her way out; and I observed, 847 | as she asked me to let her by, that she had a sulky face--a thing which, 848 | as head of the servants, I never allow, on principle, to pass me without 849 | inquiry. 850 | 851 | "What are you turning your back on your dinner for?" I asked. "What's 852 | wrong now, Nancy?" 853 | 854 | Nancy tried to push by, without answering; upon which I rose up, and 855 | took her by the ear. She is a nice plump young lass, and it is customary 856 | with me to adopt that manner of showing that I personally approve of a 857 | girl. 858 | 859 | "What's wrong now?" I said once more. 860 | 861 | "Rosanna's late again for dinner," says Nancy. "And I'm sent to fetch 862 | her in. All the hard work falls on my shoulders in this house. Let me 863 | alone, Mr. Betteredge!" 864 | 865 | The person here mentioned as Rosanna was our second housemaid. Having a 866 | kind of pity for our second housemaid (why, you shall presently know), 867 | and seeing in Nancy's face, that she would fetch her fellow-servant in 868 | with more hard words than might be needful under the circumstances, it 869 | struck me that I had nothing particular to do, and that I might as well 870 | fetch Rosanna myself; giving her a hint to be punctual in future, which 871 | I knew she would take kindly from ME. 872 | 873 | "Where is Rosanna?" I inquired. 874 | 875 | "At the sands, of course!" says Nancy, with a toss of her head. "She had 876 | another of her fainting fits this morning, and she asked to go out and 877 | get a breath of fresh air. I have no patience with her!" 878 | 879 | "Go back to your dinner, my girl," I said. "I have patience with her, 880 | and I'll fetch her in." 881 | 882 | Nancy (who has a fine appetite) looked pleased. When she looks pleased, 883 | she looks nice. When she looks nice, I chuck her under the chin. It 884 | isn't immorality--it's only habit. 885 | 886 | Well, I took my stick, and set off for the sands. 887 | 888 | No! it won't do to set off yet. I am sorry again to detain you; but you 889 | really must hear the story of the sands, and the story of Rosanna--for 890 | this reason, that the matter of the Diamond touches them both nearly. 891 | How hard I try to get on with my statement without stopping by the way, 892 | and how badly I succeed! But, there!--Persons and Things do turn up so 893 | vexatiously in this life, and will in a manner insist on being noticed. 894 | Let us take it easy, and let us take it short; we shall be in the thick 895 | of the mystery soon, I promise you! 896 | 897 | Rosanna (to put the Person before the Thing, which is but common 898 | politeness) was the only new servant in our house. About four months 899 | before the time I am writing of, my lady had been in London, and had 900 | gone over a Reformatory, intended to save forlorn women from drifting 901 | back into bad ways, after they had got released from prison. The matron, 902 | seeing my lady took an interest in the place, pointed out a girl to her, 903 | named Rosanna Spearman, and told her a most miserable story, which I 904 | haven't the heart to repeat here; for I don't like to be made wretched 905 | without any use, and no more do you. The upshot of it was, that Rosanna 906 | Spearman had been a thief, and not being of the sort that get up 907 | Companies in the City, and rob from thousands, instead of only robbing 908 | from one, the law laid hold of her, and the prison and the reformatory 909 | followed the lead of the law. The matron's opinion of Rosanna was (in 910 | spite of what she had done) that the girl was one in a thousand, and 911 | that she only wanted a chance to prove herself worthy of any Christian 912 | woman's interest in her. My lady (being a Christian woman, if ever there 913 | was one yet) said to the matron, upon that, "Rosanna Spearman shall 914 | have her chance, in my service." In a week afterwards, Rosanna Spearman 915 | entered this establishment as our second housemaid. 916 | 917 | Not a soul was told the girl's story, excepting Miss Rachel and me. My 918 | lady, doing me the honour to consult me about most things, consulted 919 | me about Rosanna. Having fallen a good deal latterly into the late Sir 920 | John's way of always agreeing with my lady, I agreed with her heartily 921 | about Rosanna Spearman. 922 | 923 | A fairer chance no girl could have had than was given to this poor girl 924 | of ours. None of the servants could cast her past life in her teeth, for 925 | none of the servants knew what it had been. She had her wages and her 926 | privileges, like the rest of them; and every now and then a friendly 927 | word from my lady, in private, to encourage her. In return, she showed 928 | herself, I am bound to say, well worthy of the kind treatment bestowed 929 | upon her. Though far from strong, and troubled occasionally with those 930 | fainting-fits already mentioned, she went about her work modestly and 931 | uncomplainingly, doing it carefully, and doing it well. But, somehow, 932 | she failed to make friends among the other women servants, excepting my 933 | daughter Penelope, who was always kind to Rosanna, though never intimate 934 | with her. 935 | 936 | I hardly know what the girl did to offend them. There was certainly no 937 | beauty about her to make the others envious; she was the plainest woman 938 | in the house, with the additional misfortune of having one shoulder 939 | bigger than the other. What the servants chiefly resented, I think, was 940 | her silent tongue and her solitary ways. She read or worked in leisure 941 | hours when the rest gossiped. And when it came to her turn to go out, 942 | nine times out of ten she quietly put on her bonnet, and had her turn by 943 | herself. She never quarrelled, she never took offence; she only kept a 944 | certain distance, obstinately and civilly, between the rest of them and 945 | herself. Add to this that, plain as she was, there was just a dash of 946 | something that wasn't like a housemaid, and that WAS like a lady, about 947 | her. It might have been in her voice, or it might have been in her face. 948 | All I can say is, that the other women pounced on it like lightning the 949 | first day she came into the house, and said (which was most unjust) that 950 | Rosanna Spearman gave herself airs. 951 | 952 | Having now told the story of Rosanna, I have only to notice one of the 953 | many queer ways of this strange girl to get on next to the story of the 954 | sands. 955 | 956 | Our house is high up on the Yorkshire coast, and close by the sea. We 957 | have got beautiful walks all round us, in every direction but one. That 958 | one I acknowledge to be a horrid walk. It leads, for a quarter of 959 | a mile, through a melancholy plantation of firs, and brings you out 960 | between low cliffs on the loneliest and ugliest little bay on all our 961 | coast. 962 | 963 | The sand-hills here run down to the sea, and end in two spits of rock 964 | jutting out opposite each other, till you lose sight of them in the 965 | water. One is called the North Spit, and one the South. Between the two, 966 | shifting backwards and forwards at certain seasons of the year, lies the 967 | most horrible quicksand on the shores of Yorkshire. At the turn of the 968 | tide, something goes on in the unknown deeps below, which sets the 969 | whole face of the quicksand shivering and trembling in a manner most 970 | remarkable to see, and which has given to it, among the people in our 971 | parts, the name of the Shivering Sand. A great bank, half a mile out, 972 | nigh the mouth of the bay, breaks the force of the main ocean coming 973 | in from the offing. Winter and summer, when the tide flows over the 974 | quicksand, the sea seems to leave the waves behind it on the bank, 975 | and rolls its waters in smoothly with a heave, and covers the sand in 976 | silence. A lonesome and a horrid retreat, I can tell you! No boat ever 977 | ventures into this bay. No children from our fishing-village, called 978 | Cobb's Hole, ever come here to play. The very birds of the air, as it 979 | seems to me, give the Shivering Sand a wide berth. That a young woman, 980 | with dozens of nice walks to choose from, and company to go with her, if 981 | she only said "Come!" should prefer this place, and should sit and work 982 | or read in it, all alone, when it's her turn out, I grant you, passes 983 | belief. It's true, nevertheless, account for it as you may, that this 984 | was Rosanna Spearman's favourite walk, except when she went once 985 | or twice to Cobb's Hole, to see the only friend she had in our 986 | neighbourhood, of whom more anon. It's also true that I was now setting 987 | out for this same place, to fetch the girl in to dinner, which brings us 988 | round happily to our former point, and starts us fair again on our way 989 | to the sands. 990 | 991 | I saw no sign of the girl in the plantation. When I got out, through the 992 | sand-hills, on to the beach, there she was, in her little straw bonnet, 993 | and her plain grey cloak that she always wore to hide her deformed 994 | shoulder as much as might be--there she was, all alone, looking out on 995 | the quicksand and the sea. 996 | 997 | She started when I came up with her, and turned her head away from me. 998 | Not looking me in the face being another of the proceedings, which, 999 | as head of the servants, I never allow, on principle, to pass without 1000 | inquiry--I turned her round my way, and saw that she was crying. My 1001 | bandanna handkerchief--one of six beauties given to me by my lady--was 1002 | handy in my pocket. I took it out, and I said to Rosanna, "Come and sit 1003 | down, my dear, on the slope of the beach along with me. I'll dry your 1004 | eyes for you first, and then I'll make so bold as to ask what you have 1005 | been crying about." 1006 | 1007 | When you come to my age, you will find sitting down on the slope of 1008 | a beach a much longer job than you think it now. By the time I 1009 | was settled, Rosanna had dried her own eyes with a very inferior 1010 | handkerchief to mine--cheap cambric. She looked very quiet, and very 1011 | wretched; but she sat down by me like a good girl, when I told her. When 1012 | you want to comfort a woman by the shortest way, take her on your knee. 1013 | I thought of this golden rule. But there! Rosanna wasn't Nancy, and 1014 | that's the truth of it! 1015 | 1016 | "Now, tell me, my dear," I said, "what are you crying about?" 1017 | 1018 | "About the years that are gone, Mr. Betteredge," says Rosanna quietly. 1019 | "My past life still comes back to me sometimes." 1020 | 1021 | "Come, come, my girl," I said, "your past life is all sponged out. Why 1022 | can't you forget it?" 1023 | 1024 | She took me by one of the lappets of my coat. I am a slovenly old man, 1025 | and a good deal of my meat and drink gets splashed about on my clothes. 1026 | Sometimes one of the women, and sometimes another, cleans me of my 1027 | grease. The day before, Rosanna had taken out a spot for me on the 1028 | lappet of my coat, with a new composition, warranted to remove anything. 1029 | The grease was gone, but there was a little dull place left on the nap 1030 | of the cloth where the grease had been. The girl pointed to that place, 1031 | and shook her head. 1032 | 1033 | "The stain is taken off," she said. "But the place shows, Mr. 1034 | Betteredge--the place shows!" 1035 | 1036 | A remark which takes a man unawares by means of his own coat is not 1037 | an easy remark to answer. Something in the girl herself, too, made me 1038 | particularly sorry for her just then. She had nice brown eyes, plain as 1039 | she was in other ways--and she looked at me with a sort of respect for 1040 | my happy old age and my good character, as things for ever out of her 1041 | own reach, which made my heart heavy for our second housemaid. Not 1042 | feeling myself able to comfort her, there was only one other thing to 1043 | do. That thing was--to take her in to dinner. 1044 | 1045 | "Help me up," I said. "You're late for dinner, Rosanna--and I have come 1046 | to fetch you in." 1047 | 1048 | "You, Mr. Betteredge!" says she. 1049 | 1050 | "They told Nancy to fetch you," I said. "But thought you might like your 1051 | scolding better, my dear, if it came from me." 1052 | 1053 | Instead of helping me up, the poor thing stole her hand into mine, and 1054 | gave it a little squeeze. She tried hard to keep from crying again, 1055 | and succeeded--for which I respected her. "You're very kind, Mr. 1056 | Betteredge," she said. "I don't want any dinner to-day--let me bide a 1057 | little longer here." 1058 | 1059 | "What makes you like to be here?" I asked. "What is it that brings you 1060 | everlastingly to this miserable place?" 1061 | 1062 | "Something draws me to it," says the girl, making images with her finger 1063 | in the sand. "I try to keep away from it, and I can't. Sometimes," 1064 | says she in a low voice, as if she was frightened at her own fancy, 1065 | "sometimes, Mr. Betteredge, I think that my grave is waiting for me 1066 | here." 1067 | 1068 | "There's roast mutton and suet-pudding waiting for you!" says I. "Go in 1069 | to dinner directly. This is what comes, Rosanna, of thinking on an empty 1070 | stomach!" I spoke severely, being naturally indignant (at my time of 1071 | life) to hear a young woman of five-and-twenty talking about her latter 1072 | end! 1073 | 1074 | She didn't seem to hear me: she put her hand on my shoulder, and kept me 1075 | where I was, sitting by her side. 1076 | 1077 | "I think the place has laid a spell on me," she said. "I dream of it 1078 | night after night; I think of it when I sit stitching at my work. You 1079 | know I am grateful, Mr. Betteredge--you know I try to deserve your 1080 | kindness, and my lady's confidence in me. But I wonder sometimes whether 1081 | the life here is too quiet and too good for such a woman as I am, after 1082 | all I have gone through, Mr. Betteredge--after all I have gone through. 1083 | It's more lonely to me to be among the other servants, knowing I am not 1084 | what they are, than it is to be here. My lady doesn't know, the matron 1085 | at the reformatory doesn't know, what a dreadful reproach honest people 1086 | are in themselves to a woman like me. Don't scold me, there's a dear 1087 | good man. I do my work, don't I? Please not to tell my lady I am 1088 | discontented--I am not. My mind's unquiet, sometimes, that's all." She 1089 | snatched her hand off my shoulder, and suddenly pointed down to the 1090 | quicksand. "Look!" she said "Isn't it wonderful? isn't it terrible? I 1091 | have seen it dozens of times, and it's always as new to me as if I had 1092 | never seen it before!" 1093 | 1094 | I looked where she pointed. The tide was on the turn, and the horrid 1095 | sand began to shiver. The broad brown face of it heaved slowly, and then 1096 | dimpled and quivered all over. "Do you know what it looks like to ME?" 1097 | says Rosanna, catching me by the shoulder again. "It looks as if it had 1098 | hundreds of suffocating people under it--all struggling to get to the 1099 | surface, and all sinking lower and lower in the dreadful deeps! Throw a 1100 | stone in, Mr. Betteredge! Throw a stone in, and let's see the sand suck 1101 | it down!" 1102 | 1103 | Here was unwholesome talk! Here was an empty stomach feeding on an 1104 | unquiet mind! My answer--a pretty sharp one, in the poor girl's own 1105 | interests, I promise you!--was at my tongue's end, when it was snapped 1106 | short off on a sudden by a voice among the sand-hills shouting for me 1107 | by my name. "Betteredge!" cries the voice, "where are you?" "Here!" 1108 | I shouted out in return, without a notion in my mind of who it was. 1109 | Rosanna started to her feet, and stood looking towards the voice. I was 1110 | just thinking of getting on my own legs next, when I was staggered by a 1111 | sudden change in the girl's face. 1112 | 1113 | Her complexion turned of a beautiful red, which I had never seen in it 1114 | before; she brightened all over with a kind of speechless and breathless 1115 | surprise. "Who is it?" I asked. Rosanna gave me back my own question. 1116 | "Oh! who is it?" she said softly, more to herself than to me. I twisted 1117 | round on the sand and looked behind me. There, coming out on us from 1118 | among the hills, was a bright-eyed young gentleman, dressed in a 1119 | beautiful fawn-coloured suit, with gloves and hat to match, with a rose 1120 | in his button-hole, and a smile on his face that might have set the 1121 | Shivering Sand itself smiling at him in return. Before I could get on my 1122 | legs, he plumped down on the sand by the side of me, put his arm round 1123 | my neck, foreign fashion, and gave me a hug that fairly squeezed the 1124 | breath out of my body. "Dear old Betteredge!" says he. "I owe you 1125 | seven-and-sixpence. Now do you know who I am?" 1126 | 1127 | Lord bless us and save us! Here--four good hours before we expected 1128 | him--was Mr. Franklin Blake! 1129 | 1130 | Before I could say a word, I saw Mr. Franklin, a little surprised to all 1131 | appearance, look up from me to Rosanna. Following his lead, I looked at 1132 | the girl too. She was blushing of a deeper red than ever, seemingly at 1133 | having caught Mr. Franklin's eye; and she turned and left us suddenly, 1134 | in a confusion quite unaccountable to my mind, without either making her 1135 | curtsey to the gentleman or saying a word to me. Very unlike her usual 1136 | self: a civiller and better-behaved servant, in general, you never met 1137 | with. 1138 | 1139 | "That's an odd girl," says Mr. Franklin. "I wonder what she sees in me 1140 | to surprise her?" 1141 | 1142 | "I suppose, sir," I answered, drolling on our young gentleman's 1143 | Continental education, "it's the varnish from foreign parts." 1144 | 1145 | I set down here Mr. Franklin's careless question, and my foolish answer, 1146 | as a consolation and encouragement to all stupid people--it being, as I 1147 | have remarked, a great satisfaction to our inferior fellow-creatures to 1148 | find that their betters are, on occasions, no brighter than they are. 1149 | Neither Mr. Franklin, with his wonderful foreign training, nor I, with 1150 | my age, experience, and natural mother-wit, had the ghost of an idea of 1151 | what Rosanna Spearman's unaccountable behaviour really meant. She was 1152 | out of our thoughts, poor soul, before we had seen the last flutter of 1153 | her little grey cloak among the sand-hills. And what of that? you will 1154 | ask, naturally enough. Read on, good friend, as patiently as you can, 1155 | and perhaps you will be as sorry for Rosanna Spearman as I was, when I 1156 | found out the truth. 1157 | 1158 | 1159 | 1160 | CHAPTER V 1161 | 1162 | 1163 | The first thing I did, after we were left together alone, was to make a 1164 | third attempt to get up from my seat on the sand. Mr. Franklin stopped 1165 | me. 1166 | 1167 | "There is one advantage about this horrid place," he said; "we have got 1168 | it all to ourselves. Stay where you are, Betteredge; I have something to 1169 | say to you." 1170 | 1171 | While he was speaking, I was looking at him, and trying to see something 1172 | of the boy I remembered, in the man before me. The man put me out. Look 1173 | as I might, I could see no more of his boy's rosy cheeks than of his 1174 | boy's trim little jacket. His complexion had got pale: his face, at the 1175 | lower part was covered, to my great surprise and disappointment, with a 1176 | curly brown beard and mustachios. He had a lively touch-and-go way with 1177 | him, very pleasant and engaging, I admit; but nothing to compare with 1178 | his free-and-easy manners of other times. To make matters worse, he 1179 | had promised to be tall, and had not kept his promise. He was neat, and 1180 | slim, and well made; but he wasn't by an inch or two up to the middle 1181 | height. In short, he baffled me altogether. The years that had passed 1182 | had left nothing of his old self, except the bright, straightforward 1183 | look in his eyes. There I found our nice boy again, and there I 1184 | concluded to stop in my investigation. 1185 | 1186 | "Welcome back to the old place, Mr. Franklin," I said. "All the more 1187 | welcome, sir, that you have come some hours before we expected you." 1188 | 1189 | "I have a reason for coming before you expected me," answered Mr. 1190 | Franklin. "I suspect, Betteredge, that I have been followed and watched 1191 | in London, for the last three or four days; and I have travelled by 1192 | the morning instead of the afternoon train, because I wanted to give a 1193 | certain dark-looking stranger the slip." 1194 | 1195 | Those words did more than surprise me. They brought back to my mind, in 1196 | a flash, the three jugglers, and Penelope's notion that they meant some 1197 | mischief to Mr. Franklin Blake. 1198 | 1199 | "Who's watching you, sir,--and why?" I inquired. 1200 | 1201 | "Tell me about the three Indians you have had at the house to-day," 1202 | says Mr. Franklin, without noticing my question. "It's just possible, 1203 | Betteredge, that my stranger and your three jugglers may turn out to be 1204 | pieces of the same puzzle." 1205 | 1206 | "How do you come to know about the jugglers, sir?" I asked, putting one 1207 | question on the top of another, which was bad manners, I own. But you 1208 | don't expect much from poor human nature--so don't expect much from me. 1209 | 1210 | "I saw Penelope at the house," says Mr. Franklin; "and Penelope told me. 1211 | Your daughter promised to be a pretty girl, Betteredge, and she has kept 1212 | her promise. Penelope has got a small ear and a small foot. Did the late 1213 | Mrs. Betteredge possess those inestimable advantages?" 1214 | 1215 | "The late Mrs. Betteredge possessed a good many defects, sir," says I. 1216 | "One of them (if you will pardon my mentioning it) was never keeping to 1217 | the matter in hand. She was more like a fly than a woman: she couldn't 1218 | settle on anything." 1219 | 1220 | "She would just have suited me," says Mr. Franklin. "I never settle 1221 | on anything either. Betteredge, your edge is better than ever. Your 1222 | daughter said as much, when I asked for particulars about the jugglers. 1223 | 'Father will tell you, sir. He's a wonderful man for his age; and he 1224 | expresses himself beautifully.' Penelope's own words--blushing divinely. 1225 | Not even my respect for you prevented me from--never mind; I knew her 1226 | when she was a child, and she's none the worse for it. Let's be serious. 1227 | What did the jugglers do?" 1228 | 1229 | I was something dissatisfied with my daughter--not for letting Mr. 1230 | Franklin kiss her; Mr. Franklin was welcome to THAT--but for forcing me 1231 | to tell her foolish story at second hand. However, there was no help for 1232 | it now but to mention the circumstances. Mr. Franklin's merriment all 1233 | died away as I went on. He sat knitting his eyebrows, and twisting his 1234 | beard. When I had done, he repeated after me two of the questions which 1235 | the chief juggler had put to the boy--seemingly for the purpose of 1236 | fixing them well in his mind. 1237 | 1238 | "'Is it on the road to this house, and on no other, that the English 1239 | gentleman will travel to-day?' 'Has the English gentleman got It about 1240 | him?' I suspect," says Mr. Franklin, pulling a little sealed paper 1241 | parcel out of his pocket, "that 'It' means THIS. And 'this,' Betteredge, 1242 | means my uncle Herncastle's famous Diamond." 1243 | 1244 | "Good Lord, sir!" I broke out, "how do you come to be in charge of the 1245 | wicked Colonel's Diamond?" 1246 | 1247 | "The wicked Colonel's will has left his Diamond as a birthday present 1248 | to my cousin Rachel," says Mr. Franklin. "And my father, as the wicked 1249 | Colonel's executor, has given it in charge to me to bring down here." 1250 | 1251 | If the sea, then oozing in smoothly over the Shivering Sand, had been 1252 | changed into dry land before my own eyes, I doubt if I could have been 1253 | more surprised than I was when Mr. Franklin spoke those words. 1254 | 1255 | "The Colonel's Diamond left to Miss Rachel!" says I. "And your father, 1256 | sir, the Colonel's executor! Why, I would have laid any bet you like, 1257 | Mr. Franklin, that your father wouldn't have touched the Colonel with a 1258 | pair of tongs!" 1259 | 1260 | "Strong language, Betteredge! What was there against the Colonel. He 1261 | belonged to your time, not to mine. Tell me what you know about him, and 1262 | I'll tell you how my father came to be his executor, and more besides. 1263 | I have made some discoveries in London about my uncle Herncastle and his 1264 | Diamond, which have rather an ugly look to my eyes; and I want you to 1265 | confirm them. You called him the 'wicked Colonel' just now. Search your 1266 | memory, my old friend, and tell me why." 1267 | 1268 | I saw he was in earnest, and I told him. 1269 | 1270 | Here follows the substance of what I said, written out entirely for your 1271 | benefit. Pay attention to it, or you will be all abroad, when we get 1272 | deeper into the story. Clear your mind of the children, or the dinner, 1273 | or the new bonnet, or what not. Try if you can't forget politics, 1274 | horses, prices in the City, and grievances at the club. I hope you won't 1275 | take this freedom on my part amiss; it's only a way I have of appealing 1276 | to the gentle reader. Lord! haven't I seen you with the greatest authors 1277 | in your hands, and don't I know how ready your attention is to wander 1278 | when it's a book that asks for it, instead of a person? 1279 | 1280 | I spoke, a little way back, of my lady's father, the old lord with the 1281 | short temper and the long tongue. He had five children in all. Two sons 1282 | to begin with; then, after a long time, his wife broke out breeding 1283 | again, and the three young ladies came briskly one after the other, 1284 | as fast as the nature of things would permit; my mistress, as before 1285 | mentioned, being the youngest and best of the three. Of the two sons, 1286 | the eldest, Arthur, inherited the title and estates. The second, the 1287 | Honourable John, got a fine fortune left him by a relative, and went 1288 | into the army. 1289 | 1290 | It's an ill bird, they say, that fouls its own nest. I look on the noble 1291 | family of the Herncastles as being my nest; and I shall take it as a 1292 | favour if I am not expected to enter into particulars on the subject 1293 | of the Honourable John. He was, I honestly believe, one of the greatest 1294 | blackguards that ever lived. I can hardly say more or less for him than 1295 | that. He went into the army, beginning in the Guards. He had to leave 1296 | the Guards before he was two-and-twenty--never mind why. They are very 1297 | strict in the army, and they were too strict for the Honourable John. He 1298 | went out to India to see whether they were equally strict there, and to 1299 | try a little active service. In the matter of bravery (to give him his 1300 | due), he was a mixture of bull-dog and game-cock, with a dash of the 1301 | savage. He was at the taking of Seringapatam. Soon afterwards he changed 1302 | into another regiment, and, in course of time, changed into a third. In 1303 | the third he got his last step as lieutenant-colonel, and, getting that, 1304 | got also a sunstroke, and came home to England. 1305 | 1306 | He came back with a character that closed the doors of all his family 1307 | against him, my lady (then just married) taking the lead, and declaring 1308 | (with Sir John's approval, of course) that her brother should never 1309 | enter any house of hers. There was more than one slur on the Colonel 1310 | that made people shy of him; but the blot of the Diamond is all I need 1311 | mention here. 1312 | 1313 | It was said he had got possession of his Indian jewel by means which, 1314 | bold as he was, he didn't dare acknowledge. He never attempted to sell 1315 | it--not being in need of money, and not (to give him his due again) 1316 | making money an object. He never gave it away; he never even showed it 1317 | to any living soul. Some said he was afraid of its getting him into a 1318 | difficulty with the military authorities; others (very ignorant indeed 1319 | of the real nature of the man) said he was afraid, if he showed it, of 1320 | its costing him his life. 1321 | 1322 | There was perhaps a grain of truth mixed up with this last report. It 1323 | was false to say that he was afraid; but it was a fact that his life 1324 | had been twice threatened in India; and it was firmly believed that the 1325 | Moonstone was at the bottom of it. When he came back to England, and 1326 | found himself avoided by everybody, the Moonstone was thought to be at 1327 | the bottom of it again. The mystery of the Colonel's life got in the 1328 | Colonel's way, and outlawed him, as you may say, among his own people. 1329 | The men wouldn't let him into their clubs; the women--more than 1330 | one--whom he wanted to marry, refused him; friends and relations got too 1331 | near-sighted to see him in the street. 1332 | 1333 | Some men in this mess would have tried to set themselves right with 1334 | the world. But to give in, even when he was wrong, and had all society 1335 | against him, was not the way of the Honourable John. He had kept the 1336 | Diamond, in flat defiance of assassination, in India. He kept the 1337 | Diamond, in flat defiance of public opinion, in England. There you have 1338 | the portrait of the man before you, as in a picture: a character that 1339 | braved everything; and a face, handsome as it was, that looked possessed 1340 | by the devil. 1341 | 1342 | We heard different rumours about him from time to time. Sometimes 1343 | they said he was given up to smoking opium and collecting old books; 1344 | sometimes he was reported to be trying strange things in chemistry; 1345 | sometimes he was seen carousing and amusing himself among the lowest 1346 | people in the lowest slums of London. Anyhow, a solitary, vicious, 1347 | underground life was the life the Colonel led. Once, and once only, 1348 | after his return to England, I myself saw him, face to face. 1349 | 1350 | About two years before the time of which I am now writing, and about 1351 | a year and a half before the time of his death, the Colonel came 1352 | unexpectedly to my lady's house in London. It was the night of Miss 1353 | Rachel's birthday, the twenty-first of June; and there was a party in 1354 | honour of it, as usual. I received a message from the footman to say 1355 | that a gentleman wanted to see me. Going up into the hall, there I found 1356 | the Colonel, wasted, and worn, and old, and shabby, and as wild and as 1357 | wicked as ever. 1358 | 1359 | "Go up to my sister," says he; "and say that I have called to wish my 1360 | niece many happy returns of the day." 1361 | 1362 | He had made attempts by letter, more than once already, to be reconciled 1363 | with my lady, for no other purpose, I am firmly persuaded, than to annoy 1364 | her. But this was the first time he had actually come to the house. I 1365 | had it on the tip of my tongue to say that my mistress had a party that 1366 | night. But the devilish look of him daunted me. I went up-stairs with 1367 | his message, and left him, by his own desire, waiting in the hall. The 1368 | servants stood staring at him, at a distance, as if he was a walking 1369 | engine of destruction, loaded with powder and shot, and likely to go off 1370 | among them at a moment's notice. 1371 | 1372 | My lady had a dash--no more--of the family temper. "Tell Colonel 1373 | Herncastle," she said, when I gave her her brother's message, "that Miss 1374 | Verinder is engaged, and that I decline to see him." I tried to plead 1375 | for a civiller answer than that; knowing the Colonel's constitutional 1376 | superiority to the restraints which govern gentlemen in general. Quite 1377 | useless! The family temper flashed out at me directly. "When I want your 1378 | advice," says my lady, "you know that I always ask for it. I don't ask 1379 | for it now." I went downstairs with the message, of which I took the 1380 | liberty of presenting a new and amended edition of my own contriving, as 1381 | follows: "My lady and Miss Rachel regret that they are engaged, Colonel; 1382 | and beg to be excused having the honour of seeing you." 1383 | 1384 | I expected him to break out, even at that polite way of putting it. 1385 | To my surprise he did nothing of the sort; he alarmed me by taking the 1386 | thing with an unnatural quiet. His eyes, of a glittering bright grey, 1387 | just settled on me for a moment; and he laughed, not out of himself, 1388 | like other people, but INTO himself, in a soft, chuckling, horridly 1389 | mischievous way. "Thank you, Betteredge," he said. "I shall remember my 1390 | niece's birthday." With that, he turned on his heel, and walked out of 1391 | the house. 1392 | 1393 | The next birthday came round, and we heard he was ill in bed. Six months 1394 | afterwards--that is to say, six months before the time I am now writing 1395 | of--there came a letter from a highly respectable clergyman to my lady. 1396 | It communicated two wonderful things in the way of family news. First, 1397 | that the Colonel had forgiven his sister on his death-bed. Second, that 1398 | he had forgiven everybody else, and had made a most edifying end. I have 1399 | myself (in spite of the bishops and the clergy) an unfeigned respect for 1400 | the Church; but I am firmly persuaded, at the same time, that the devil 1401 | remained in undisturbed possession of the Honourable John, and that the 1402 | last abominable act in the life of that abominable man was (saving your 1403 | presence) to take the clergyman in! 1404 | 1405 | This was the sum-total of what I had to tell Mr. Franklin. I remarked 1406 | that he listened more and more eagerly the longer I went on. Also, that 1407 | the story of the Colonel being sent away from his sister's door, on the 1408 | occasion of his niece's birthday, seemed to strike Mr. Franklin like a 1409 | shot that had hit the mark. Though he didn't acknowledge it, I saw that 1410 | I had made him uneasy, plainly enough, in his face. 1411 | 1412 | "You have said your say, Betteredge," he remarked. "It's my turn now. 1413 | Before, however, I tell you what discoveries I have made in London, and 1414 | how I came to be mixed up in this matter of the Diamond, I want to know 1415 | one thing. You look, my old friend, as if you didn't quite understand 1416 | the object to be answered by this consultation of ours. Do your looks 1417 | belie you?" 1418 | 1419 | "No, sir," I said. "My looks, on this occasion at any rate, tell the 1420 | truth." 1421 | 1422 | "In that case," says Mr. Franklin, "suppose I put you up to my point 1423 | of view, before we go any further. I see three very serious questions 1424 | involved in the Colonel's birthday-gift to my cousin Rachel. Follow me 1425 | carefully, Betteredge; and count me off on your fingers, if it will 1426 | help you," says Mr. Franklin, with a certain pleasure in showing how 1427 | clear-headed he could be, which reminded me wonderfully of old times 1428 | when he was a boy. "Question the first: Was the Colonel's Diamond the 1429 | object of a conspiracy in India? Question the second: Has the conspiracy 1430 | followed the Colonel's Diamond to England? Question the third: Did the 1431 | Colonel know the conspiracy followed the Diamond; and has he purposely 1432 | left a legacy of trouble and danger to his sister, through the innocent 1433 | medium of his sister's child? THAT is what I am driving at, Betteredge. 1434 | Don't let me frighten you." 1435 | 1436 | It was all very well to say that, but he HAD frightened me. 1437 | 1438 | If he was right, here was our quiet English house suddenly invaded by 1439 | a devilish Indian Diamond--bringing after it a conspiracy of living 1440 | rogues, set loose on us by the vengeance of a dead man. There was our 1441 | situation as revealed to me in Mr. Franklin's last words! Who ever heard 1442 | the like of it--in the nineteenth century, mind; in an age of progress, 1443 | and in a country which rejoices in the blessings of the British 1444 | constitution? Nobody ever heard the like of it, and, consequently, 1445 | nobody can be expected to believe it. I shall go on with my story, 1446 | however, in spite of that. 1447 | 1448 | When you get a sudden alarm, of the sort that I had got now, nine times 1449 | out of ten the place you feel it in is your stomach. When you feel it 1450 | in your stomach, your attention wanders, and you begin to fidget. I 1451 | fidgeted silently in my place on the sand. Mr. Franklin noticed me, 1452 | contending with a perturbed stomach or mind--which you please; they mean 1453 | the same thing--and, checking himself just as he was starting with his 1454 | part of the story, said to me sharply, "What do you want?" 1455 | 1456 | What did I want? I didn't tell HIM; but I'll tell YOU, in confidence. I 1457 | wanted a whiff of my pipe, and a turn at ROBINSON CRUSOE. 1458 | 1459 | 1460 | 1461 | CHAPTER VI 1462 | 1463 | 1464 | Keeping my private sentiments to myself, I respectfully requested Mr. 1465 | Franklin to go on. Mr. Franklin replied, "Don't fidget, Betteredge," and 1466 | went on. 1467 | 1468 | Our young gentleman's first words informed me that his discoveries, 1469 | concerning the wicked Colonel and the Diamond, had begun with a visit 1470 | which he had paid (before he came to us) to the family lawyer, at 1471 | Hampstead. A chance word dropped by Mr. Franklin, when the two were 1472 | alone, one day, after dinner, revealed that he had been charged by his 1473 | father with a birthday present to be taken to Miss Rachel. One thing 1474 | led to another; and it ended in the lawyer mentioning what the present 1475 | really was, and how the friendly connexion between the late Colonel 1476 | and Mr. Blake, senior, had taken its rise. The facts here are really so 1477 | extraordinary, that I doubt if I can trust my own language to do justice 1478 | to them. I prefer trying to report Mr. Franklin's discoveries, as nearly 1479 | as may be, in Mr. Franklin's own words. 1480 | 1481 | "You remember the time, Betteredge," he said, "when my father was trying 1482 | to prove his title to that unlucky Dukedom? Well! that was also the time 1483 | when my uncle Herncastle returned from India. My father discovered that 1484 | his brother-in-law was in possession of certain papers which were likely 1485 | to be of service to him in his lawsuit. He called on the Colonel, on 1486 | pretence of welcoming him back to England. The Colonel was not to be 1487 | deluded in that way. 'You want something,' he said, 'or you would never 1488 | have compromised your reputation by calling on ME.' My father saw that 1489 | the one chance for him was to show his hand; he admitted, at once, 1490 | that he wanted the papers. The Colonel asked for a day to consider his 1491 | answer. His answer came in the shape of a most extraordinary letter, 1492 | which my friend the lawyer showed me. The Colonel began by saying that 1493 | he wanted something of my father, and that he begged to propose an 1494 | exchange of friendly services between them. The fortune of war (that 1495 | was the expression he used) had placed him in possession of one of the 1496 | largest Diamonds in the world; and he had reason to believe that neither 1497 | he nor his precious jewel was safe in any house, in any quarter of the 1498 | globe, which they occupied together. Under these alarming circumstances, 1499 | he had determined to place his Diamond in the keeping of another person. 1500 | That person was not expected to run any risk. He might deposit the 1501 | precious stone in any place especially guarded and set apart--like a 1502 | banker's or jeweller's strong-room--for the safe custody of valuables of 1503 | high price. His main personal responsibility in the matter was to be 1504 | of the passive kind. He was to undertake either by himself, or by a 1505 | trustworthy representative--to receive at a prearranged address, on 1506 | certain prearranged days in every year, a note from the Colonel, simply 1507 | stating the fact that he was a living man at that date. In the event 1508 | of the date passing over without the note being received, the Colonel's 1509 | silence might be taken as a sure token of the Colonel's death by murder. 1510 | In that case, and in no other, certain sealed instructions relating to 1511 | the disposal of the Diamond, and deposited with it, were to be opened, 1512 | and followed implicitly. If my father chose to accept this strange 1513 | charge, the Colonel's papers were at his disposal in return. That was 1514 | the letter." 1515 | 1516 | "What did your father do, sir?" I asked. 1517 | 1518 | "Do?" says Mr. Franklin. "I'll tell you what he did. He brought the 1519 | invaluable faculty, called common sense, to bear on the Colonel's 1520 | letter. The whole thing, he declared, was simply absurd. Somewhere in 1521 | his Indian wanderings, the Colonel had picked up with some wretched 1522 | crystal which he took for a diamond. As for the danger of his being 1523 | murdered, and the precautions devised to preserve his life and his piece 1524 | of crystal, this was the nineteenth century, and any man in his senses 1525 | had only to apply to the police. The Colonel had been a notorious 1526 | opium-eater for years past; and, if the only way of getting at the 1527 | valuable papers he possessed was by accepting a matter of opium as 1528 | a matter of fact, my father was quite willing to take the ridiculous 1529 | responsibility imposed on him--all the more readily that it involved no 1530 | trouble to himself. The Diamond and the sealed instructions went into 1531 | his banker's strong-room, and the Colonel's letters, periodically 1532 | reporting him a living man, were received and opened by our family 1533 | lawyer, Mr. Bruff, as my father's representative. No sensible person, 1534 | in a similar position, could have viewed the matter in any other way. 1535 | Nothing in this world, Betteredge, is probable unless it appeals to our 1536 | own trumpery experience; and we only believe in a romance when we see it 1537 | in a newspaper." 1538 | 1539 | It was plain to me from this, that Mr. Franklin thought his father's 1540 | notion about the Colonel hasty and wrong. 1541 | 1542 | "What is your own private opinion about the matter, sir?" I asked. 1543 | 1544 | "Let's finish the story of the Colonel first," says Mr. Franklin. "There 1545 | is a curious want of system, Betteredge, in the English mind; and your 1546 | question, my old friend, is an instance of it. When we are not occupied 1547 | in making machinery, we are (mentally speaking) the most slovenly people 1548 | in the universe." 1549 | 1550 | "So much," I thought to myself, "for a foreign education! He has learned 1551 | that way of girding at us in France, I suppose." 1552 | 1553 | Mr. Franklin took up the lost thread, and went on. 1554 | 1555 | "My father," he said, "got the papers he wanted, and never saw his 1556 | brother-in-law again from that time. Year after year, on the prearranged 1557 | days, the prearranged letter came from the Colonel, and was opened by 1558 | Mr. Bruff. I have seen the letters, in a heap, all of them written in 1559 | the same brief, business-like form of words: 'Sir,--This is to certify 1560 | that I am still a living man. Let the Diamond be. John Herncastle.' That 1561 | was all he ever wrote, and that came regularly to the day; until some 1562 | six or eight months since, when the form of the letter varied for the 1563 | first time. It ran now: 'Sir,--They tell me I am dying. Come to me, and 1564 | help me to make my will.' Mr. Bruff went, and found him, in the little 1565 | suburban villa, surrounded by its own grounds, in which he had lived 1566 | alone, ever since he had left India. He had dogs, cats, and birds to 1567 | keep him company; but no human being near him, except the person who 1568 | came daily to do the house-work, and the doctor at the bedside. The will 1569 | was a very simple matter. The Colonel had dissipated the greater part of 1570 | his fortune in his chemical investigations. His will began and ended in 1571 | three clauses, which he dictated from his bed, in perfect possession 1572 | of his faculties. The first clause provided for the safe keeping 1573 | and support of his animals. The second founded a professorship of 1574 | experimental chemistry at a northern university. The third bequeathed 1575 | the Moonstone as a birthday present to his niece, on condition that 1576 | my father would act as executor. My father at first refused to act. On 1577 | second thoughts, however, he gave way, partly because he was assured 1578 | that the executorship would involve him in no trouble; partly because 1579 | Mr. Bruff suggested, in Rachel's interest, that the Diamond might be 1580 | worth something, after all." 1581 | 1582 | "Did the Colonel give any reason, sir," I inquired, "why he left the 1583 | Diamond to Miss Rachel?" 1584 | 1585 | "He not only gave the reason--he had the reason written in his 1586 | will," said Mr. Franklin. "I have got an extract, which you shall see 1587 | presently. Don't be slovenly-minded, Betteredge! One thing at a time. 1588 | You have heard about the Colonel's Will; now you must hear what happened 1589 | after the Colonel's death. It was formally necessary to have the Diamond 1590 | valued, before the Will could be proved. All the jewellers consulted, 1591 | at once confirmed the Colonel's assertion that he possessed one of the 1592 | largest diamonds in the world. The question of accurately valuing it 1593 | presented some serious difficulties. Its size made it a phenomenon in 1594 | the diamond market; its colour placed it in a category by itself; and, 1595 | to add to these elements of uncertainty, there was a defect, in the 1596 | shape of a flaw, in the very heart of the stone. Even with this last 1597 | serious draw-back, however, the lowest of the various estimates given 1598 | was twenty thousand pounds. Conceive my father's astonishment! He had 1599 | been within a hair's-breadth of refusing to act as executor, and of 1600 | allowing this magnificent jewel to be lost to the family. The interest 1601 | he took in the matter now, induced him to open the sealed instructions 1602 | which had been deposited with the Diamond. Mr. Bruff showed this 1603 | document to me, with the other papers; and it suggests (to my mind) 1604 | a clue to the nature of the conspiracy which threatened the Colonel's 1605 | life." 1606 | 1607 | "Then you do believe, sir," I said, "that there was a conspiracy?" 1608 | 1609 | "Not possessing my father's excellent common sense," answered Mr. 1610 | Franklin, "I believe the Colonel's life was threatened, exactly as the 1611 | Colonel said. The sealed instructions, as I think, explain how it was 1612 | that he died, after all, quietly in his bed. In the event of his death 1613 | by violence (that is to say, in the absence of the regular letter from 1614 | him at the appointed date), my father was then directed to send the 1615 | Moonstone secretly to Amsterdam. It was to be deposited in that city 1616 | with a famous diamond-cutter, and it was to be cut up into from four to 1617 | six separate stones. The stones were then to be sold for what they 1618 | would fetch, and the proceeds were to be applied to the founding of that 1619 | professorship of experimental chemistry, which the Colonel has since 1620 | endowed by his Will. Now, Betteredge, exert those sharp wits of yours, 1621 | and observe the conclusion to which the Colonel's instructions point!" 1622 | 1623 | I instantly exerted my wits. They were of the slovenly English sort; and 1624 | they consequently muddled it all, until Mr. Franklin took them in hand, 1625 | and pointed out what they ought to see. 1626 | 1627 | "Remark," says Mr. Franklin, "that the integrity of the Diamond, as a 1628 | whole stone, is here artfully made dependent on the preservation from 1629 | violence of the Colonel's life. He is not satisfied with saying to the 1630 | enemies he dreads, 'Kill me--and you will be no nearer to the Diamond 1631 | than you are now; it is where you can't get at it--in the guarded 1632 | strong-room of a bank.' He says instead, 'Kill me--and the Diamond will 1633 | be the Diamond no longer; its identity will be destroyed.' What does 1634 | that mean?" 1635 | 1636 | Here I had (as I thought) a flash of the wonderful foreign brightness. 1637 | 1638 | "I know," I said. "It means lowering the value of the stone, and 1639 | cheating the rogues in that way!" 1640 | 1641 | "Nothing of the sort," says Mr. Franklin. "I have inquired about that. 1642 | The flawed Diamond, cut up, would actually fetch more than the Diamond 1643 | as it now is; for this plain reason--that from four to six perfect 1644 | brilliants might be cut from it, which would be, collectively, worth 1645 | more money than the large--but imperfect single stone. If robbery for 1646 | the purpose of gain was at the bottom of the conspiracy, the Colonel's 1647 | instructions absolutely made the Diamond better worth stealing. More 1648 | money could have been got for it, and the disposal of it in the diamond 1649 | market would have been infinitely easier, if it had passed through the 1650 | hands of the workmen of Amsterdam." 1651 | 1652 | "Lord bless us, sir!" I burst out. "What was the plot, then?" 1653 | 1654 | "A plot organised among the Indians who originally owned the jewel," 1655 | says Mr. Franklin--"a plot with some old Hindoo superstition at the 1656 | bottom of it. That is my opinion, confirmed by a family paper which I 1657 | have about me at this moment." 1658 | 1659 | I saw, now, why the appearance of the three Indian jugglers at our house 1660 | had presented itself to Mr. Franklin in the light of a circumstance 1661 | worth noting. 1662 | 1663 | "I don't want to force my opinion on you," Mr. Franklin went on. "The 1664 | idea of certain chosen servants of an old Hindoo superstition devoting 1665 | themselves, through all difficulties and dangers, to watching the 1666 | opportunity of recovering their sacred gem, appears to me to be 1667 | perfectly consistent with everything that we know of the patience of 1668 | Oriental races, and the influence of Oriental religions. But then I am 1669 | an imaginative man; and the butcher, the baker, and the tax-gatherer, 1670 | are not the only credible realities in existence to my mind. Let the 1671 | guess I have made at the truth in this matter go for what it is worth, 1672 | and let us get on to the only practical question that concerns us. Does 1673 | the conspiracy against the Moonstone survive the Colonel's death? And 1674 | did the Colonel know it, when he left the birthday gift to his niece?" 1675 | 1676 | I began to see my lady and Miss Rachel at the end of it all, now. Not a 1677 | word he said escaped me. 1678 | 1679 | "I was not very willing, when I discovered the story of the Moonstone," 1680 | said Mr. Franklin, "to be the means of bringing it here. But Mr. Bruff 1681 | reminded me that somebody must put my cousin's legacy into my cousin's 1682 | hands--and that I might as well do it as anybody else. After taking the 1683 | Diamond out of the bank, I fancied I was followed in the streets by a 1684 | shabby, dark-complexioned man. I went to my father's house to pick up 1685 | my luggage, and found a letter there, which unexpectedly detained me in 1686 | London. I went back to the bank with the Diamond, and thought I saw 1687 | the shabby man again. Taking the Diamond once more out of the bank 1688 | this morning, I saw the man for the third time, gave him the slip, and 1689 | started (before he recovered the trace of me) by the morning instead 1690 | of the afternoon train. Here I am, with the Diamond safe and sound--and 1691 | what is the first news that meets me? I find that three strolling 1692 | Indians have been at the house, and that my arrival from London, and 1693 | something which I am expected to have about me, are two special objects 1694 | of investigation to them when they believe themselves to be alone. I 1695 | don't waste time and words on their pouring the ink into the boy's hand, 1696 | and telling him to look in it for a man at a distance, and for something 1697 | in that man's pocket. The thing (which I have often seen done in the 1698 | East) is 'hocus-pocus' in my opinion, as it is in yours. The present 1699 | question for us to decide is, whether I am wrongly attaching a meaning 1700 | to a mere accident? or whether we really have evidence of the Indians 1701 | being on the track of the Moonstone, the moment it is removed from the 1702 | safe keeping of the bank?" 1703 | 1704 | Neither he nor I seemed to fancy dealing with this part of the inquiry. 1705 | We looked at each other, and then we looked at the tide, oozing in 1706 | smoothly, higher and higher, over the Shivering Sand. 1707 | 1708 | "What are you thinking of?" says Mr. Franklin, suddenly. 1709 | 1710 | "I was thinking, sir," I answered, "that I should like to shy the 1711 | Diamond into the quicksand, and settle the question in THAT way." 1712 | 1713 | "If you have got the value of the stone in your pocket," answered Mr. 1714 | Franklin, "say so, Betteredge, and in it goes!" 1715 | 1716 | It's curious to note, when your mind's anxious, how very far in the way 1717 | of relief a very small joke will go. We found a fund of merriment, 1718 | at the time, in the notion of making away with Miss Rachel's 1719 | lawful property, and getting Mr. Blake, as executor, into dreadful 1720 | trouble--though where the merriment was, I am quite at a loss to 1721 | discover now. 1722 | 1723 | Mr. Franklin was the first to bring the talk back to the talk's proper 1724 | purpose. He took an envelope out of his pocket, opened it, and handed to 1725 | me the paper inside. 1726 | 1727 | "Betteredge," he said, "we must face the question of the Colonel's 1728 | motive in leaving this legacy to his niece, for my aunt's sake. Bear 1729 | in mind how Lady Verinder treated her brother from the time when he 1730 | returned to England, to the time when he told you he should remember his 1731 | niece's birthday. And read that." 1732 | 1733 | He gave me the extract from the Colonel's Will. I have got it by me 1734 | while I write these words; and I copy it, as follows, for your benefit: 1735 | 1736 | "Thirdly, and lastly, I give and bequeath to my niece, Rachel Verinder, 1737 | daughter and only child of my sister, Julia Verinder, widow--if her 1738 | mother, the said Julia Verinder, shall be living on the said Rachel 1739 | Verinder's next Birthday after my death--the yellow Diamond belonging to 1740 | me, and known in the East by the name of The Moonstone: subject to this 1741 | condition, that her mother, the said Julia Verinder, shall be living at 1742 | the time. And I hereby desire my executor to give my Diamond, either by 1743 | his own hands or by the hands of some trustworthy representative whom he 1744 | shall appoint, into the personal possession of my said niece Rachel, on 1745 | her next birthday after my death, and in the presence, if possible, of 1746 | my sister, the said Julia Verinder. And I desire that my said sister may 1747 | be informed, by means of a true copy of this, the third and last clause 1748 | of my Will, that I give the Diamond to her daughter Rachel, in token of 1749 | my free forgiveness of the injury which her conduct towards me has been 1750 | the means of inflicting on my reputation in my lifetime; and especially 1751 | in proof that I pardon, as becomes a dying man, the insult offered to me 1752 | as an officer and a gentleman, when her servant, by her orders, closed 1753 | the door of her house against me, on the occasion of her daughter's 1754 | birthday." 1755 | 1756 | More words followed these, providing if my lady was dead, or if Miss 1757 | Rachel was dead, at the time of the testator's decease, for the Diamond 1758 | being sent to Holland, in accordance with the sealed instructions 1759 | originally deposited with it. The proceeds of the sale were, in 1760 | that case, to be added to the money already left by the Will for the 1761 | professorship of chemistry at the university in the north. 1762 | 1763 | I handed the paper back to Mr. Franklin, sorely troubled what to say to 1764 | him. Up to that moment, my own opinion had been (as you know) that the 1765 | Colonel had died as wickedly as he had lived. I don't say the copy 1766 | from his Will actually converted me from that opinion: I only say it 1767 | staggered me. 1768 | 1769 | "Well," says Mr. Franklin, "now you have read the Colonel's own 1770 | statement, what do you say? In bringing the Moonstone to my aunt's 1771 | house, am I serving his vengeance blindfold, or am I vindicating him in 1772 | the character of a penitent and Christian man?" 1773 | 1774 | "It seems hard to say, sir," I answered, "that he died with a horrid 1775 | revenge in his heart, and a horrid lie on his lips. God alone knows the 1776 | truth. Don't ask me." 1777 | 1778 | Mr. Franklin sat twisting and turning the extract from the Will in 1779 | his fingers, as if he expected to squeeze the truth out of it in that 1780 | manner. He altered quite remarkably, at the same time. From being brisk 1781 | and bright, he now became, most unaccountably, a slow, solemn, and 1782 | pondering young man. 1783 | 1784 | "This question has two sides," he said. "An Objective side, and a 1785 | Subjective side. Which are we to take?" 1786 | 1787 | He had had a German education as well as a French. One of the two had 1788 | been in undisturbed possession of him (as I supposed) up to this time. 1789 | And now (as well as I could make out) the other was taking its place. It 1790 | is one of my rules in life, never to notice what I don't understand. I 1791 | steered a middle course between the Objective side and the Subjective 1792 | side. In plain English I stared hard, and said nothing. 1793 | 1794 | "Let's extract the inner meaning of this," says Mr. Franklin. "Why 1795 | did my uncle leave the Diamond to Rachel? Why didn't he leave it to my 1796 | aunt?" 1797 | 1798 | "That's not beyond guessing, sir, at any rate," I said. "Colonel 1799 | Herncastle knew my lady well enough to know that she would have refused 1800 | to accept any legacy that came to her from HIM." 1801 | 1802 | "How did he know that Rachel might not refuse to accept it, too?" 1803 | 1804 | "Is there any young lady in existence, sir, who could resist the 1805 | temptation of accepting such a birthday present as The Moonstone?" 1806 | 1807 | "That's the Subjective view," says Mr. Franklin. "It does you great 1808 | credit, Betteredge, to be able to take the Subjective view. But there's 1809 | another mystery about the Colonel's legacy which is not accounted for 1810 | yet. How are we to explain his only giving Rachel her birthday present 1811 | conditionally on her mother being alive?" 1812 | 1813 | "I don't want to slander a dead man, sir," I answered. "But if he HAS 1814 | purposely left a legacy of trouble and danger to his sister, by the 1815 | means of her child, it must be a legacy made conditional on his sister's 1816 | being alive to feel the vexation of it." 1817 | 1818 | "Oh! That's your interpretation of his motive, is it? The Subjective 1819 | interpretation again! Have you ever been in Germany, Betteredge?" 1820 | 1821 | "No, sir. What's your interpretation, if you please?" 1822 | 1823 | "I can see," says Mr. Franklin, "that the Colonel's object may, quite 1824 | possibly, have been--not to benefit his niece, whom he had never even 1825 | seen--but to prove to his sister that he had died forgiving her, and to 1826 | prove it very prettily by means of a present made to her child. There is 1827 | a totally different explanation from yours, Betteredge, taking its 1828 | rise in a Subjective-Objective point of view. From all I can see, one 1829 | interpretation is just as likely to be right as the other." 1830 | 1831 | Having brought matters to this pleasant and comforting issue, Mr. 1832 | Franklin appeared to think that he had completed all that was required 1833 | of him. He laid down flat on his back on the sand, and asked what was to 1834 | be done next. 1835 | 1836 | He had been so clever, and clear-headed (before he began to talk the 1837 | foreign gibberish), and had so completely taken the lead in the business 1838 | up to the present time, that I was quite unprepared for such a sudden 1839 | change as he now exhibited in this helpless leaning upon me. It was not 1840 | till later that I learned--by assistance of Miss Rachel, who was 1841 | the first to make the discovery--that these puzzling shifts and 1842 | transformations in Mr. Franklin were due to the effect on him of his 1843 | foreign training. At the age when we are all of us most apt to take 1844 | our colouring, in the form of a reflection from the colouring of other 1845 | people, he had been sent abroad, and had been passed on from one nation 1846 | to another, before there was time for any one colouring more than 1847 | another to settle itself on him firmly. As a consequence of this, he 1848 | had come back with so many different sides to his character, all more or 1849 | less jarring with each other, that he seemed to pass his life in a state 1850 | of perpetual contradiction with himself. He could be a busy man, and 1851 | a lazy man; cloudy in the head, and clear in the head; a model of 1852 | determination, and a spectacle of helplessness, all together. He had 1853 | his French side, and his German side, and his Italian side--the original 1854 | English foundation showing through, every now and then, as much as 1855 | to say, "Here I am, sorely transmogrified, as you see, but there's 1856 | something of me left at the bottom of him still." Miss Rachel used to 1857 | remark that the Italian side of him was uppermost, on those occasions 1858 | when he unexpectedly gave in, and asked you in his nice sweet-tempered 1859 | way to take his own responsibilities on your shoulders. You will do him 1860 | no injustice, I think, if you conclude that the Italian side of him was 1861 | uppermost now. 1862 | 1863 | "Isn't it your business, sir," I asked, "to know what to do next? Surely 1864 | it can't be mine?" 1865 | 1866 | Mr. Franklin didn't appear to see the force of my question--not being in 1867 | a position, at the time, to see anything but the sky over his head. 1868 | 1869 | "I don't want to alarm my aunt without reason," he said. "And I don't 1870 | want to leave her without what may be a needful warning. If you were in 1871 | my place, Betteredge, tell me, in one word, what would you do?" 1872 | 1873 | In one word, I told him: "Wait." 1874 | 1875 | "With all my heart," says Mr. Franklin. "How long?" 1876 | 1877 | I proceeded to explain myself. 1878 | 1879 | "As I understand it, sir," I said, "somebody is bound to put this plaguy 1880 | Diamond into Miss Rachel's hands on her birthday--and you may as well 1881 | do it as another. Very good. This is the twenty-fifth of May, and the 1882 | birthday is on the twenty-first of June. We have got close on four weeks 1883 | before us. Let's wait and see what happens in that time; and let's warn 1884 | my lady, or not, as the circumstances direct us." 1885 | 1886 | "Perfect, Betteredge, as far as it goes!" says Mr. Franklin. "But 1887 | between this and the birthday, what's to be done with the Diamond?" 1888 | 1889 | "What your father did with it, to be sure, sir!" I answered. "Your 1890 | father put it in the safe keeping of a bank in London. You put in the 1891 | safe keeping of the bank at Frizinghall." (Frizinghall was our nearest 1892 | town, and the Bank of England wasn't safer than the bank there.) "If 1893 | I were you, sir," I added, "I would ride straight away with it to 1894 | Frizinghall before the ladies come back." 1895 | 1896 | The prospect of doing something--and, what is more, of doing that 1897 | something on a horse--brought Mr. Franklin up like lightning from the 1898 | flat of his back. He sprang to his feet, and pulled me up, without 1899 | ceremony, on to mine. "Betteredge, you are worth your weight in 1900 | gold," he said. "Come along, and saddle the best horse in the stables 1901 | directly." 1902 | 1903 | Here (God bless it!) was the original English foundation of him showing 1904 | through all the foreign varnish at last! Here was the Master Franklin 1905 | I remembered, coming out again in the good old way at the prospect of a 1906 | ride, and reminding me of the good old times! Saddle a horse for him? 1907 | I would have saddled a dozen horses, if he could only have ridden them 1908 | all! 1909 | 1910 | We went back to the house in a hurry; we had the fleetest horse in the 1911 | stables saddled in a hurry; and Mr. Franklin rattled off in a hurry, to 1912 | lodge the cursed Diamond once more in the strong-room of a bank. When 1913 | I heard the last of his horse's hoofs on the drive, and when I turned 1914 | about in the yard and found I was alone again, I felt half inclined to 1915 | ask myself if I hadn't woke up from a dream. 1916 | 1917 | 1918 | 1919 | CHAPTER VII 1920 | 1921 | 1922 | While I was in this bewildered frame of mind, sorely needing a little 1923 | quiet time by myself to put me right again, my daughter Penelope got in 1924 | my way (just as her late mother used to get in my way on the stairs), 1925 | and instantly summoned me to tell her all that had passed at the 1926 | conference between Mr. Franklin and me. Under present circumstances, 1927 | the one thing to be done was to clap the extinguisher upon Penelope's 1928 | curiosity on the spot. I accordingly replied that Mr. Franklin and I had 1929 | both talked of foreign politics, till we could talk no longer, and had 1930 | then mutually fallen asleep in the heat of the sun. Try that sort of 1931 | answer when your wife or your daughter next worries you with an awkward 1932 | question at an awkward time, and depend on the natural sweetness of 1933 | women for kissing and making it up again at the next opportunity. 1934 | 1935 | The afternoon wore on, and my lady and Miss Rachel came back. 1936 | 1937 | Needless to say how astonished they were, when they heard that Mr. 1938 | Franklin Blake had arrived, and had gone off again on horseback. 1939 | Needless also to say, that THEY asked awkward questions directly, and 1940 | that the "foreign politics" and the "falling asleep in the sun" wouldn't 1941 | serve a second time over with THEM. Being at the end of my invention, I 1942 | said Mr. Franklin's arrival by the early train was entirely attributable 1943 | to one of Mr. Franklin's freaks. Being asked, upon that, whether his 1944 | galloping off again on horseback was another of Mr. Franklin's freaks, 1945 | I said, "Yes, it was;" and slipped out of it--I think very cleverly--in 1946 | that way. 1947 | 1948 | Having got over my difficulties with the ladies, I found more 1949 | difficulties waiting for me when I went back to my own room. In came 1950 | Penelope--with the natural sweetness of women--to kiss and make it 1951 | up again; and--with the natural curiosity of women--to ask another 1952 | question. This time she only wanted me to tell her what was the matter 1953 | with our second housemaid, Rosanna Spearman. 1954 | 1955 | After leaving Mr. Franklin and me at the Shivering Sand, Rosanna, it 1956 | appeared, had returned to the house in a very unaccountable state of 1957 | mind. She had turned (if Penelope was to be believed) all the colours of 1958 | the rainbow. She had been merry without reason, and sad without reason. 1959 | In one breath she asked hundreds of questions about Mr. Franklin Blake, 1960 | and in another breath she had been angry with Penelope for presuming to 1961 | suppose that a strange gentleman could possess any interest for her. She 1962 | had been surprised, smiling, and scribbling Mr. Franklin's name inside 1963 | her workbox. She had been surprised again, crying and looking at her 1964 | deformed shoulder in the glass. Had she and Mr. Franklin known anything 1965 | of each other before to-day? Quite impossible! Had they heard anything 1966 | of each other? Impossible again! I could speak to Mr. Franklin's 1967 | astonishment as genuine, when he saw how the girl stared at him. 1968 | Penelope could speak to the girl's inquisitiveness as genuine, when she 1969 | asked questions about Mr. Franklin. The conference between us, conducted 1970 | in this way, was tiresome enough, until my daughter suddenly ended it 1971 | by bursting out with what I thought the most monstrous supposition I had 1972 | ever heard in my life. 1973 | 1974 | "Father!" says Penelope, quite seriously, "there's only one explanation 1975 | of it. Rosanna has fallen in love with Mr. Franklin Blake at first 1976 | sight!" 1977 | 1978 | You have heard of beautiful young ladies falling in love at first 1979 | sight, and have thought it natural enough. But a housemaid out of a 1980 | reformatory, with a plain face and a deformed shoulder, falling in love, 1981 | at first sight, with a gentleman who comes on a visit to her mistress's 1982 | house, match me that, in the way of an absurdity, out of any story-book 1983 | in Christendom, if you can! I laughed till the tears rolled down my 1984 | cheeks. Penelope resented my merriment, in rather a strange way. "I 1985 | never knew you cruel before, father," she said, very gently, and went 1986 | out. 1987 | 1988 | My girl's words fell upon me like a splash of cold water. I was savage 1989 | with myself, for feeling uneasy in myself the moment she had spoken 1990 | them--but so it was. We will change the subject, if you please. I am 1991 | sorry I drifted into writing about it; and not without reason, as you 1992 | will see when we have gone on together a little longer. 1993 | 1994 | The evening came, and the dressing-bell for dinner rang, before Mr. 1995 | Franklin returned from Frizinghall. I took his hot water up to his 1996 | room myself, expecting to hear, after this extraordinary delay, that 1997 | something had happened. To my great disappointment (and no doubt to 1998 | yours also), nothing had happened. He had not met with the Indians, 1999 | either going or returning. He had deposited the Moonstone in the 2000 | bank--describing it merely as a valuable of great price--and he had got 2001 | the receipt for it safe in his pocket. I went down-stairs, feeling 2002 | that this was rather a flat ending, after all our excitement about the 2003 | Diamond earlier in the day. 2004 | 2005 | How the meeting between Mr. Franklin and his aunt and cousin went off, 2006 | is more than I can tell you. 2007 | 2008 | I would have given something to have waited at table that day. But, in 2009 | my position in the household, waiting at dinner (except on high 2010 | family festivals) was letting down my dignity in the eyes of the other 2011 | servants--a thing which my lady considered me quite prone enough to do 2012 | already, without seeking occasions for it. The news brought to me from 2013 | the upper regions, that evening, came from Penelope and the footman. 2014 | Penelope mentioned that she had never known Miss Rachel so particular 2015 | about the dressing of her hair, and had never seen her look so bright 2016 | and pretty as she did when she went down to meet Mr. Franklin in the 2017 | drawing-room. The footman's report was, that the preservation of a 2018 | respectful composure in the presence of his betters, and the waiting 2019 | on Mr. Franklin Blake at dinner, were two of the hardest things to 2020 | reconcile with each other that had ever tried his training in service. 2021 | Later in the evening, we heard them singing and playing duets, Mr. 2022 | Franklin piping high, Miss Rachel piping higher, and my lady, on the 2023 | piano, following them as it were over hedge and ditch, and seeing them 2024 | safe through it in a manner most wonderful and pleasant to hear through 2025 | the open windows, on the terrace at night. Later still, I went to Mr. 2026 | Franklin in the smoking-room, with the soda-water and brandy, and found 2027 | that Miss Rachel had put the Diamond clean out of his head. "She's the 2028 | most charming girl I have seen since I came back to England!" was all I 2029 | could extract from him, when I endeavoured to lead the conversation to 2030 | more serious things. 2031 | 2032 | Towards midnight, I went round the house to lock up, accompanied by my 2033 | second in command (Samuel, the footman), as usual. When all the doors 2034 | were made fast, except the side door that opened on the terrace, I sent 2035 | Samuel to bed, and stepped out for a breath of fresh air before I too 2036 | went to bed in my turn. 2037 | 2038 | The night was still and close, and the moon was at the full in the 2039 | heavens. It was so silent out of doors, that I heard from time to time, 2040 | very faint and low, the fall of the sea, as the ground-swell heaved 2041 | it in on the sand-bank near the mouth of our little bay. As the house 2042 | stood, the terrace side was the dark side; but the broad moonlight 2043 | showed fair on the gravel walk that ran along the next side to the 2044 | terrace. Looking this way, after looking up at the sky, I saw the shadow 2045 | of a person in the moonlight thrown forward from behind the corner of 2046 | the house. 2047 | 2048 | Being old and sly, I forbore to call out; but being also, unfortunately, 2049 | old and heavy, my feet betrayed me on the gravel. Before I could steal 2050 | suddenly round the corner, as I had proposed, I heard lighter feet 2051 | than mine--and more than one pair of them as I thought--retreating in 2052 | a hurry. By the time I had got to the corner, the trespassers, whoever 2053 | they were, had run into the shrubbery at the off side of the walk, and 2054 | were hidden from sight among the thick trees and bushes in that part of 2055 | the grounds. From the shrubbery, they could easily make their way, over 2056 | our fence into the road. If I had been forty years younger, I might have 2057 | had a chance of catching them before they got clear of our premises. 2058 | As it was, I went back to set a-going a younger pair of legs than mine. 2059 | Without disturbing anybody, Samuel and I got a couple of guns, and went 2060 | all round the house and through the shrubbery. Having made sure that 2061 | no persons were lurking about anywhere in our grounds, we turned back. 2062 | Passing over the walk where I had seen the shadow, I now noticed, for 2063 | the first time, a little bright object, lying on the clean gravel, under 2064 | the light of the moon. Picking the object up, I discovered it was a 2065 | small bottle, containing a thick sweet-smelling liquor, as black as ink. 2066 | 2067 | I said nothing to Samuel. But, remembering what Penelope had told me 2068 | about the jugglers, and the pouring of the little pool of ink into the 2069 | palm of the boy's hand, I instantly suspected that I had disturbed the 2070 | three Indians, lurking about the house, and bent, in their heathenish 2071 | way, on discovering the whereabouts of the Diamond that night. 2072 | 2073 | 2074 | 2075 | CHAPTER VIII 2076 | 2077 | 2078 | Here, for one moment, I find it necessary to call a halt. 2079 | 2080 | On summoning up my own recollections--and on getting Penelope to help 2081 | me, by consulting her journal--I find that we may pass pretty rapidly 2082 | over the interval between Mr. Franklin Blake's arrival and Miss Rachel's 2083 | birthday. For the greater part of that time the days passed, and brought 2084 | nothing with them worth recording. With your good leave, then, and 2085 | with Penelope's help, I shall notice certain dates only in this place; 2086 | reserving to myself to tell the story day by day, once more, as soon as 2087 | we get to the time when the business of the Moonstone became the chief 2088 | business of everybody in our house. 2089 | 2090 | This said, we may now go on again--beginning, of course, with the bottle 2091 | of sweet-smelling ink which I found on the gravel walk at night. 2092 | 2093 | On the next morning (the morning of the twenty-sixth) I showed Mr. 2094 | Franklin this article of jugglery, and told him what I have already told 2095 | you. His opinion was, not only that the Indians had been lurking about 2096 | after the Diamond, but also that they were actually foolish enough to 2097 | believe in their own magic--meaning thereby the making of signs on a 2098 | boy's head, and the pouring of ink into a boy's hand, and then expecting 2099 | him to see persons and things beyond the reach of human vision. In our 2100 | country, as well as in the East, Mr. Franklin informed me, there are 2101 | people who practise this curious hocus-pocus (without the ink, however); 2102 | and who call it by a French name, signifying something like brightness 2103 | of sight. "Depend upon it," says Mr. Franklin, "the Indians took it for 2104 | granted that we should keep the Diamond here; and they brought their 2105 | clairvoyant boy to show them the way to it, if they succeeded in getting 2106 | into the house last night." 2107 | 2108 | "Do you think they'll try again, sir?" I asked. 2109 | 2110 | "It depends," says Mr. Franklin, "on what the boy can really do. If he 2111 | can see the Diamond through the iron safe of the bank at Frizinghall, we 2112 | shall be troubled with no more visits from the Indians for the present. 2113 | If he can't, we shall have another chance of catching them in the 2114 | shrubbery, before many more nights are over our heads." 2115 | 2116 | I waited pretty confidently for that latter chance; but, strange to 2117 | relate, it never came. 2118 | 2119 | Whether the jugglers heard, in the town, of Mr. Franklin having been 2120 | seen at the bank, and drew their conclusions accordingly; or whether the 2121 | boy really did see the Diamond where the Diamond was now lodged (which 2122 | I, for one, flatly disbelieve); or whether, after all, it was a mere 2123 | effect of chance, this at any rate is the plain truth--not the ghost 2124 | of an Indian came near the house again, through the weeks that passed 2125 | before Miss Rachel's birthday. The jugglers remained in and about the 2126 | town plying their trade; and Mr. Franklin and I remained waiting to see 2127 | what might happen, and resolute not to put the rogues on their guard 2128 | by showing our suspicions of them too soon. With this report of the 2129 | proceedings on either side, ends all that I have to say about the 2130 | -------------------------------------------------------------------------------- /src/decode.rs: -------------------------------------------------------------------------------- 1 | use std::io::{self, Write, BufRead, Cursor}; 2 | use std::char; 3 | use self::DecodeState::*; 4 | use self::DecodeErrKind::*; 5 | use io_support::{self, write_char, CharsError}; 6 | use entities::*; 7 | 8 | #[derive(Debug)] 9 | pub enum DecodeErrKind { 10 | /// A non-existent named entity was referenced. 11 | /// Example: &thisentitydoesnotexist 12 | UnknownEntity, 13 | 14 | /// A numerical escape sequence (&# or &#x) containing an invalid character. 15 | /// Examples: ` a`, `oo` 16 | MalformedNumEscape, 17 | 18 | /// A numerical escape sequence (&# or &#x) resolved to an invalid unicode code point. 19 | /// Example: `�` 20 | InvalidCharacter, 21 | 22 | /// The input ended prematurely (ie. inside an unterminated named entity sequence). 23 | PrematureEnd, 24 | 25 | /// An IO error occured. 26 | IoError(io::Error), 27 | 28 | /// The supplied Reader produces invalid UTF-8. 29 | EncodingError, 30 | } 31 | 32 | impl PartialEq for DecodeErrKind { 33 | fn eq(&self, other: &DecodeErrKind) -> bool { 34 | match (self, other) { 35 | (&UnknownEntity, &UnknownEntity) => true, 36 | (&MalformedNumEscape, &MalformedNumEscape) => true, 37 | (&InvalidCharacter, &InvalidCharacter) => true, 38 | (&PrematureEnd, &PrematureEnd) => true, 39 | (&IoError(_), &IoError(_)) => true, 40 | (&EncodingError, &EncodingError) => true, 41 | _ => false 42 | } 43 | } 44 | } 45 | 46 | impl Eq for DecodeErrKind {} 47 | 48 | /// Error from decoding a entity-encoded string. 49 | #[derive(Debug, Eq, PartialEq)] 50 | pub struct DecodeErr { 51 | /// Number of characters read from the input before encountering an error 52 | pub position: usize, 53 | /// Type of error 54 | pub kind: DecodeErrKind 55 | } 56 | 57 | #[derive(PartialEq, Eq)] 58 | enum DecodeState { 59 | Normal, 60 | Entity, 61 | Named, 62 | Numeric, 63 | Hex, 64 | Dec 65 | } 66 | 67 | macro_rules! try_parse( 68 | ($parse:expr, $pos:expr) => ( 69 | match $parse { 70 | Err(reason) => return Err(DecodeErr{ position: $pos, kind: reason}), 71 | Ok(res) => res 72 | } 73 | );); 74 | 75 | macro_rules! try_dec_io( 76 | ($io:expr, $pos:expr) => ( 77 | match $io { 78 | Err(e) => return Err(DecodeErr{ position: $pos, kind: IoError(e)}), 79 | Ok(res) => res 80 | } 81 | );); 82 | 83 | /// Decodes an entity-encoded string from a reader to a writer. 84 | /// 85 | /// Similar to `decode_html`, except reading from a reader rather than a string, and 86 | /// writing to a writer rather than returning a `String`. 87 | /// 88 | /// # Arguments 89 | /// - `reader` - UTF-8 encoded data is read from here. 90 | /// - `writer` - UTF8- decoded data is written to here. 91 | /// 92 | /// # Errors 93 | /// Errors can be caused by IO errors, `reader` producing invalid UTF-8, or by syntax errors. 94 | pub fn decode_html_rw(reader: R, writer: &mut W) -> Result<(), DecodeErr> { 95 | let mut state: DecodeState = Normal; 96 | let mut pos = 0; 97 | let mut good_pos = 0; 98 | let mut buf = String::with_capacity(8); 99 | for c in io_support::chars(reader) { 100 | let c = match c { 101 | Err(e) => { 102 | let kind = match e { 103 | CharsError::NotUtf8 => EncodingError, 104 | CharsError::Other(io) => IoError(io) 105 | }; 106 | return Err(DecodeErr{ position: pos, kind: kind }); 107 | } 108 | Ok(c) => c 109 | }; 110 | match state { 111 | Normal if c == '&' => state = Entity, 112 | Normal => try_dec_io!(write_char(writer, c), good_pos), 113 | Entity if c == '#' => state = Numeric, 114 | Entity if c == ';' => return Err(DecodeErr{ position: good_pos, kind: UnknownEntity }), 115 | Entity => { 116 | state = Named; 117 | buf.push(c); 118 | } 119 | Named if c == ';' => { 120 | state = Normal; 121 | let ch = try_parse!(decode_named_entity(&buf), good_pos); 122 | try_dec_io!(write_char(writer, ch), good_pos); 123 | buf.clear(); 124 | } 125 | Named => buf.push(c), 126 | Numeric if is_digit(c) => { 127 | state = Dec; 128 | buf.push(c); 129 | } 130 | Numeric if c == 'x' => state = Hex, 131 | Dec if c == ';' => { 132 | state = Normal; 133 | let ch = try_parse!(decode_numeric(&buf, 10), good_pos); 134 | try_dec_io!(write_char(writer, ch), good_pos); 135 | buf.clear(); 136 | } 137 | Hex if c == ';' => { 138 | state = Normal; 139 | let ch = try_parse!(decode_numeric(&buf, 16), good_pos); 140 | try_dec_io!(write_char(writer, ch), good_pos); 141 | buf.clear(); 142 | } 143 | Hex if is_hex_digit(c) => buf.push(c), 144 | Dec if is_digit(c) => buf.push(c), 145 | Numeric | Hex | Dec => return Err(DecodeErr{ position: good_pos, kind: MalformedNumEscape}), 146 | } 147 | pos += 1; 148 | if state == Normal { 149 | good_pos = pos; 150 | } 151 | } 152 | if state != Normal { 153 | Err(DecodeErr{ position: good_pos, kind: PrematureEnd}) 154 | } else { 155 | Ok(()) 156 | } 157 | } 158 | 159 | /// Decodes an entity-encoded string. 160 | /// 161 | /// Decodes an entity encoded string, replacing HTML entities (`&`, `` ...) with the 162 | /// the corresponding character. Case matters for named entities, ie. `&Amp;` is invalid. 163 | /// Case does not matter for hex entities, so `.` and `.` are treated the same. 164 | /// 165 | /// # Arguments 166 | /// - `s` - Entity-encoded string to decode. 167 | /// 168 | /// # Failure 169 | /// The function will fail if input string contains invalid named entities (eg. `&nosuchentity;`), 170 | /// invalid hex entities (eg. `&#xRT;`), invalid decimal entities (eg. `&#-1;), unclosed entities 171 | /// (`s == "& hej och hå"`) or otherwise malformed entities. 172 | /// 173 | /// This function will never return errors with `kind` set to `IoError` or `EncodingError`. 174 | pub fn decode_html(s: &str) -> Result { 175 | let mut writer = Vec::with_capacity(s.len()); 176 | let bytes = s.as_bytes(); 177 | let mut reader = Cursor::new(bytes); 178 | let res = decode_html_rw(&mut reader, &mut writer); 179 | match res { 180 | Ok(_) => Ok(String::from_utf8(writer).unwrap()), 181 | Err(err) => Err(err) 182 | } 183 | } 184 | 185 | fn is_digit(c: char) -> bool { c >= '0' && c <= '9' } 186 | 187 | fn is_hex_digit(c: char) -> bool { 188 | is_digit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') 189 | } 190 | 191 | fn decode_named_entity(entity: &str) -> Result { 192 | match NAMED_ENTITIES.binary_search_by(|&(ent, _)| ent.cmp(entity)) { 193 | Err(..) => Err(UnknownEntity), 194 | Ok(idx) => { 195 | let (_, c) = NAMED_ENTITIES[idx]; 196 | Ok(c) 197 | } 198 | } 199 | } 200 | 201 | fn decode_numeric(esc: &str, radix: u32) -> Result { 202 | match u32::from_str_radix(esc, radix) { 203 | Ok(n) => match char::from_u32(n) { 204 | Some(c) => Ok(c), 205 | None => Err(InvalidCharacter) 206 | }, 207 | Err(..) => Err(MalformedNumEscape) 208 | } 209 | } 210 | 211 | -------------------------------------------------------------------------------- /src/encode.rs: -------------------------------------------------------------------------------- 1 | use std::io::{self, Write}; 2 | use std::char; 3 | use io_support::{write_char}; 4 | use entities::*; 5 | 6 | /// 7 | /// HTML entity-encode a string. 8 | /// 9 | /// Entity-encodes a string with a minimal set of entities: 10 | /// 11 | /// - `" -- "` 12 | /// - `& -- &` 13 | /// - `' -- '` 14 | /// - `< -- <` 15 | /// - `> -- >` 16 | /// 17 | /// # Arguments 18 | /// - `s` - The string to encode. 19 | /// 20 | /// # Return value 21 | /// The encoded string. 22 | /// 23 | /// # Example 24 | /// ~~~ 25 | /// let encoded = htmlescape::encode_minimal("Hej!"); 26 | /// assert_eq!(&encoded, "<em>Hej!</em>"); 27 | /// ~~~ 28 | /// 29 | /// # Safety notes 30 | /// Using the function to encode an untrusted string that is to be used as a HTML attribute value 31 | /// may lead to XSS vulnerabilities. Consider the following example: 32 | /// 33 | /// ~~~ 34 | /// let name = "dummy onmouseover=alert(/XSS/)"; // User input 35 | /// let tag = format!("